Hi everyone,
I'm working on a project where I have four sensors connected to my chip via two SPI buses ( 2 on each with 4 CS). My goal is to read data from these sensors as concurrently as possible to ensure minimal latency. The idea is to read two sensors at the same time (using both SPI buses) and then immediately read the remaining two sensors afterwards.
My Questions:
-
Triggering Sequential Reads: I'm a bit unsure about how to configure the PPI channels to trigger the second set of SPI reads immediately after the first( With the toggling of the CS Pins inbetween). Because if i just connect the end event of the Spi Read to the start task it would loop forever. My goal is to complete the first two sensor readings concurrently and then move on to the next two without delay. Then wait for the next timer event before starting the next round of reads.
-
Associating Data to Sensors: Since I'm reading 4 sensors but only have two RX buffers, how should I correctly associate the data to the corresponding sensors? What's the best way to manage or distinguish the data coming from the four sensors?
Any guidance on setting this up would be greatly appreciated!
Thanks in advance!