2018-07-14 12:23 AM
I have a requirement to use 12 external interrupts and 1 USART receive interrupt and 6 ADC channels to monitor. i am using stm32f103zet6. is this choice good for my requirements ? also i need help to program different interrupts all together:
I want to make a program to read 12 external interrupts which almost occurs at same time . and at any given time it should receive USART interrupt and halt the process.
and on USART, how can i receive data of unknown length ?
Experts, Please help
#stm32-stm32f103-stm32f103ze2018-07-15 04:14 PM
that's an old chip. although any chip will do the same work, just a speed issue.
what is your primary reason for choosing that chip ?
12 interrupts on pins? what are you trying to read ? buttons or signals ?
what is the max frequency here ?
ADC DMA easy enough,
Uart DMA easy stuff
I suggest the F072 if you want USB or the F091 if you dont.
H7xx if you want to be blazingly fast.
2018-07-15 10:29 PM
... to read 12 external interrupts which almost occurs at same time .
This is not really very specific. A delay of 1 ms is 'at the same time' for human senses, but quite long for a 72MHz MCU.
... and at any given time it should receive USART interrupt and halt the process.
and on USART, how can i receive data of unknown length ?
You can priorize the interrupts properly, so that the UART interrupt preempts the EXTI.
And receiving UART data of unknown sentence length is a 'standard' task. In the receive interrupt, check each character for the sentence start/end. Don't do heavy processing in the interrupt, rather set a flag for the main loop code, and copy the receive data.
2018-07-16 01:42 AM
1)I chose STM32F103ZET6 LQFP144 because of more GPIO pins as i need more
than 20GPIOs and also i needed 12 External interrupt pins, 6 ADC pins and 3
UARTs.
2)Frequency is like,for every one second , the proximity 6 sensors give
signal to 6 pins and other 6 external interrupts which are switches.
Inshort, 12 external interrupts occur nearly at the same time
I am trying to read 6 signals from individual proximity sensor.
Best Regards
Raghavendra Rajput
E-rachit technologies Pvt Ltd