![]()  | 
			
					roboforum.ruТехнический форум по робототехнике.  | 
			
				
					 | 
		
 
   processGyroData(GyroBuffer, GyroTempBuffer);   =303521 t
  processAccelData(AccBuffer, AccTempBuffer);   =1802600 t
  processMagnetoData(MagBuffer, MagTempBuffer);   =1802490 t

dccharacter писал(а):Кстати, это функции из примеров, из которых просто вырезано получение данных
void EXTI1_IRQHandler(void) {
  /* Clear the EXTI line pending bit */
  EXTI_ClearITPendingBit(EXTI_Line1);
  STM_EVAL_LEDToggle(LED3);
  STM_EVAL_LEDOn(LED4);
  readAllSensors(GyroTempBuffer, AccTempBuffer, MagTempBuffer); // <--- чтение из железа занимает 1мс, скорости отпущены, если увеличить вдвое i2c, то ьудет свистеть
  STM_EVAL_LEDOff(LED4);
  GyroDRDFlag = 1;
}32694
      updateQuaternions(QuaternionsBuffer);
32753
AHRS_GetValues(val);
32760
processGyroData(GyroBuffer, GyroTempBuffer);
32786
L3GD20_Read(&tmpreg, L3GD20_CTRL_REG4_ADDR, 1);
32817
  L3GD20_SendByte(ReadAddr);
32829 !!! L3GD20Timeout=4096
  /* Loop while DR register in not empty */
  L3GD20Timeout = L3GD20_FLAG_TIMEOUT;
  while (SPI_I2S_GetFlagStatus(L3GD20_SPI, SPI_I2S_FLAG_TXE) == RESET)
  {
    if((L3GD20Timeout--) == 0) return L3GD20_TIMEOUT_UserCallback();
  } 
***********************************************************
/**
  * @brief  Checks whether the specified SPI flag is set or not.
  * @param  SPIx: To select the SPIx/I2Sx peripheral, where x can be: 1, 2 or 3 
  *         in SPI mode or 2 or 3 in I2S mode or I2Sxext for I2S full duplex mode.  
  * @param  SPI_I2S_FLAG: specifies the SPI flag to check. 
  *   This parameter can be one of the following values:
  *     @arg SPI_I2S_FLAG_TXE: Transmit buffer empty flag.
  *     @arg SPI_I2S_FLAG_RXNE: Receive buffer not empty flag.
  *     @arg SPI_I2S_FLAG_BSY: Busy flag.
  *     @arg SPI_I2S_FLAG_OVR: Overrun flag.
  *     @arg SPI_I2S_FLAG_MODF: Mode Fault flag.
  *     @arg SPI_I2S_FLAG_CRCERR: CRC Error flag.
  *     @arg SPI_I2S_FLAG_FRE: TI frame format error flag.
  *     @arg I2S_FLAG_UDR: Underrun Error flag.
  *     @arg I2S_FLAG_CHSIDE: Channel Side flag.   
  * @retval The new state of SPI_I2S_FLAG (SET or RESET).
  */
FlagStatus SPI_I2S_GetFlagStatus(SPI_TypeDef* SPIx, uint16_t SPI_I2S_FLAG)
{
  FlagStatus bitstatus = RESET;
  /* Check the parameters */
  assert_param(IS_SPI_ALL_PERIPH_EXT(SPIx));
  assert_param(IS_SPI_I2S_GET_FLAG(SPI_I2S_FLAG));
  /* Check the status of the specified SPI flag */
  if ((SPIx->SR & SPI_I2S_FLAG) != (uint16_t)RESET)
  {
    /* SPI_I2S_FLAG is set */
    bitstatus = SET;
  }
  else
  {
    /* SPI_I2S_FLAG is reset */
    bitstatus = RESET;
  }
  /* Return the SPI_I2S_FLAG status */
  return  bitstatus;
}
//L3GD20Timeout=4096
  /* Loop while DR register in not empty */
  L3GD20Timeout = L3GD20_FLAG_TIMEOUT;
  while (SPI_I2S_GetFlagStatus(L3GD20_SPI, SPI_I2S_FLAG_TXE) == RESET)
  {
    if((L3GD20Timeout--) == 0) return L3GD20_TIMEOUT_UserCallback();
  } 
dccharacter писал(а):хм, а я в симуляторе не могу попасть на эти функции. Прога висит на всяких инициациях гиры и проч. Как ты до них дошел-то?

))elmot писал(а):Я делает. Лежит недопиленный балансер. Так что довольно внимательно смотрю на твои изголятельства.
А, да, в F3 есть набортный операционник. Можно его заморщить:)
dccharacter писал(а):Типа проброс периферии вообще на любую ногу и т.д.
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 0