2011-09-29 03:08 PM
I am using an STM32F103ZE but could switch to a different model.
I need to have all five UARTs running at the same time to receive data from different peripherals. Originally I was thinking of having 5 ISRs to handle the incoming data on a single byte basis. However, given the volume of incoming data over each port I am concerned the frequency of interrupts for each byte could be too much. My understanding of using the DMA would help for only two ports. Does anyone have a suggestion how to handle receiving a high volume of data from all of the UART ports and not get bogged down by too many interrupts? Would switching to the STM32F2x series allow me to use DMA to a FIFO on all five UARTS? Thanks. #divide-and-conquer2011-09-29 04:41 PM
I'd have to check your exact part (pins/package), but the some of STM32F103ZE family (FLASH 512KB/RAM 64KB) are certainly capable of 3 USART Tx/Rx DMA (USART1,2,3 via DMA1), as I've tried that. And I'm also pretty sure DMA2 permits supports USART4, but that's probably a 105 or 107 part. Why don't you review the datasheets?
Personally, I'm not excited about the ST USART implementation, I'd be tempted to slap a couple of external quad-uart parts with proper HW FIFO implementations into the design. Also from personal experience I would commit USART1 to being the programming/debug port.2011-09-29 09:05 PM
You might want to think about changing to an STM32F2xx part. That way you'll get a lot more CPU cycles to handle the ISRs. Or the DMAs, whichever way you prefer to run it. There's a person I know of locally who's using a 2x part for exactly that reason - to be able to use all the UARTs on the part.
2011-09-29 11:57 PM
''the volume of incoming data over each port''
So what, exactly, is the volume of incoming data? And its speed? Can any of your peripherals support flow control?
2011-09-30 01:23 AM
Rather than just have 1 Big STM32 trying to do everything itself, might it be better to go multi-processor and have a few, ''smaller'' processors handling (some of) the work...?