cancel
Showing results for 
Search instead for 
Did you mean: 

A few questions before I dive in

magene
Senior II
Posted on September 22, 2014 at 22:37

I'm considering moving my current project to the STM32 family (and future projects if it works out well) and have a few questions before I make the leap.

Q1) Assuming I start with the 32F429IDiscovery, can I setup 8 interrupt handlers, one for each of the 8 USART/UARTs and have 8 devices all talking at roughly the same time?  Most of the devices are 9600 baud although one of them is 115 kbaud.  All 8 devices won't be talking simultaneously but at least 4 will.  The framework I currently use is a state machine with a producer/consumer queue that the device interrupt handlers can write into asynchronously whenever data shows up.  No polling and no blocking.

Q2) Is there a example program that shows how to set up an interrupt handler for a UART?  More importantly, how easy to use are the peripheral drivers for basic, not fancy IO?  Eventually, I'll need to add SPI and I2C devices and it's been my experience that I can sink an unreasonable amount of time into getting device drivers working. Will I be able to use the example code ST provide with a reasonable amount of effort on my part or will I have to ready every word of the data sheet and reference manual?

Q3) How effective is the free ST IDE?  Are the non-free IDEs (Keil, IAR, etc) worth the cost relative the to ST IDE?

Thanks
2 REPLIES 2
Posted on September 22, 2014 at 23:08

A1) Doesn't sound too taxing, you can decimate the interrupt load on out-going data with DMA easily.

A2) How much research have you done? The level of complexity is easily gauged. Review the available code/examples.

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https%3a//my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32F4%20USART%20receive%20problem&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=2680

or STM32F4xx_DSP_StdPeriph_Lib_V1.3.0\Project\STM32F4xx_StdPeriph_Examples\USART\USART_HyperTerminal

The firmware library isn't complicated, additional coverage can be gained through selective reading of the Data Sheet/Manual and Reference Manuals. If new to Cortex-Mx, would suggested reviewing the ARM TRM's and Joseph Yiu's book(s). The most current covers M3/M4, but the older ones might be more accessible.

A3) ST does not have an IDE. One should use caution with code generators. GNU/GCC is free, Eclipse if free, pick a chain you're capable of servicing yourself, and suits your tastes. The free solutions generally have a half-arsed debug environment. I regularly use Keil and GNU/GCC. Ultimately you get the support you pay for. Keil/ARM have better/deeper sw engineering talent than ST. Lower cost solutions consider Rowley. CooCox is free but their support/focus is slow and lacking.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
magene
Senior II
Posted on September 23, 2014 at 00:15

Thanks for the quick response.  That link to the examples is exactly what I was looking for and hadn't been able to find.  And it was Atmel I was thinking of who had the free IDE, my mistake.  We have a couple of IAR licenses but I work in a variety of locations and the licensing situation is kind of tough.

One more slightly awkward question.  I notice ST seems to have a .Net Micro port for the Discovery board.  I've seen a few posts on this forum for people who use it but was wondering if you had any more light to shed.  I've found .Net Micro to be incredibly effective at getting the guts of a project up and running quickly but not particularly high performance (it is interpreted after all) and taking advantage of Cortex capabilities like the various low power states is pretty difficult.

Thanks again.