2020-05-16 04:22 PM
I've been able to figure out how to do basic interrupt and DMA I/O on both STM32L4 and STM32F4 UARTs with the HAL Library. But I'd sure like to figure out how to do this without the burden of the HAL libraries. Can someone point me at a complete example?
I think I understand what Clive1 is doing in the IRQ handler here
https://community.st.com/s/feed/0D50X00009XkVxKSAV?t=1589670347809
but I haven't been able to figure out how to write all the setup code (mapping pins, enabling clocks, setting interrupts, etc.) without HAL.
A related question: I wind up doing a lot of I/O to RS232 devices and the message length is almost never known in advance. Ideally, I'd like to be able to implement the MODBUS character match function that seems to be built into the L4 but I'd also like to do the same thing on an F4. Is that possible?
2020-05-16 06:53 PM
> I haven't been able to figure out how to write all the setup code (mapping pins, enabling clocks, setting interrupts, etc.) without HAL.
That's a lot of different things. If you break down what specifically you're having issues with, there is typically an easy answer. LL library is also an option.
> Ideally, I'd like to be able to implement the MODBUS character match function that seems to be built into the L4 but I'd also like to do the same thing on an F4. Is that possible?
Hardware UART Modbus character matching is not available on the STM32F4 series. You can do it in software, of course.
2020-05-16 11:06 PM
https://github.com/MaJerle/stm32-usart-uart-dma-rx-tx
I hope this helps.
2020-05-17 12:43 AM
[shameless self-advertisement] I have some barebones examples at efton.sk/STM32 so that might demonstrate how to set up clocks/GPIO/interrupts, but I don't think there's any particular example for UART there [/shameless self-advertisement]
JW