Posted on April 30, 2015 at 14:48
was trying to configure the UART to the Futaba SBUS spec (100000/8E2) and cubemx generated the following initialization code:
void MX_USART1_UART_Init(void)
{
huart1.Instance = USART1;
huart1.Init.Bau...
Posted on April 24, 2015 at 16:43
hi
trying to enable USB VCP on the stm32f103c8 device, used the cubemx generator, selected USB device and CDC class, updated the clock generation page so that it generated the 48MHz clock for USB (HSE Pre...
Posted on April 08, 2015 at 04:45
so i tried turning on ''
#define USE_FULL_ASSERT'' in stm32f1xx_hal.h and found it complaining about a bunch of errors (false positives). listing two common ones here:
stm32f1xx_hal_gpio.c line 210
...
Posted on April 06, 2015 at 06:36
hey all
trying to get basic interrupt-based and DMA-based I2C code to run.
the setup is a stm32f103cb with mpu6050 connected via I2C. i followed the HAL I2C examples except that there are none spec...
Posted on April 04, 2015 at 03:00hii'm pretty new to stm32, and even newer to the stm32cube HAL code generation.i tried to configure it for an stm32f103cb device but with PB3/PB4 used for GPIO instead of the standard JTAG signals.the generated code ...
Posted on May 02, 2015 at 16:46
i think you need to define the
EXTI4_15_IRQHandlerirq handler, similar (but not exactly the same) as this:
void EXTI15_10_IRQHandler(void)
{
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_12);
}
Posted on April 25, 2015 at 02:33in general, i think you should keep processing in the ISR context ''as short as possible''. in this case, you could post an event to an event queue, or set a volatile global variable to indicate you have received dat...
Posted on April 24, 2015 at 17:05i always thought it is never safe to call CDC_Transmit_FS() in the context of an ISR (or the callback in this case). it you follow CDC_Transmit_FS() in the code, it'll call HAL_PCD_EP_Transmit() eventually, which doe...
Posted on April 19, 2015 at 06:16
try
__HAL_TIM_SET_COMPARE(htim, tim_channel, cnt);
where cnt is the new pulse interval.
cnt /htim->Init.Period would be theduty cycle.
Posted on April 10, 2015 at 02:50
i try to avoid register access if using the HAL, so that would be
if (htim->Instance == TIM2 && htim->Channel == HAL_TIM_ACTIVE_CHANNEL_2) {
int32_t v = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_2);