Hello,
We bought ARM CM0+ deliverables from ARM. I want to design an SoC which has to get data from an another system .The aim of the SoC is to process an array of 4096 samples received from the external world.For the data interfacing, we are using GPIO interface IPs provided by ARM as part of deliverables.
Can anyone explain how the GPIO works in CM0+ and how to program in C?
Thanks,
Sabarish
If the system is purely time based, then you may want to look at the SysTick example from CMSIS: Systick Timer (SYSTICK)
This results in the SysTick_Handler() function being called on a periodic basis. It should be a simple task to add a global array and an index value, and then to update the SysTick_Handler() so that it reads a value from the GPIO, appends it to the global array, increments the index, and if the index is a certain value, reset the index and perform the necessary work on the array.
You may also want to replace the final "while(1);" in the example with "while(1) __WFI();", which will cause the CPU to sleep until the next SysTick interrupt.
hth
Simon.
Hi Simon,
Thank you for your reply. It was so helpful. I have some further queries regarding the Systick Timer.
As you said, I am copying the data from GPIO port to an array as global Variable. Actually, I need to write the code to manipulate the array when the index reaches 4096. So, there are two things to be happened in parallel,
1) I need to get the data from outside world at 1ms interval
2) I need to process the array when index reaches 4096.
My issue here is how to do two operations at a time. What I meant is the data should be written continuously into an array and at the same time, it has to do the operations on the array when index reaches 4096. So how to do parallel processing.
Anyone, Could you please suggest me any idea.
Regards,
Sabarish.