Tricore TC277 - SPI driver in FreeRTOS

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
DSRnathan
Level 3
Level 3
50 sign-ins 25 replies posted 25 sign-ins
Hello Everyone,
I am working on FreeRTOS using TC277 micro-controller. i am trying to develop Infineon QSPI driver into FreeRTOS.
Has anyone got any suggestions or any examples to implement. I have had developed QSPI standalone and tested in Triboard.(using iLLD).
Note:- I have freeRTOS framework integrated with iLLD.

Thank you everyone for your support.

Deepak
0 Likes
5 Replies
Markus4711
Level 2
Level 2
First like received 10 questions asked 10 sign-ins
Hi Deepak,

I'm currently thinking to port FreeRTOS to a TC375 device. I found a port for the TC277 but for some reason this is not working in my toolchain (Aurix Development Studio). The port is able to schedule tasks but has problems to
perform a task switch back to a task that has been scheduled before. It seems to me there is a hick-up in the CAS handling. Personally I have some doubts that this is related to the tool chain. Nevertheless, the port needs some rework anyway because the port is relatively old.

Is your FreeRTOS port ready to work in the Aurix Development Studio tool chain?
If so, I would appreciate if you can share some details or sources with me.

Best Regards
Markus
0 Likes
Markus4711
Level 2
Level 2
First like received 10 questions asked 10 sign-ins
Hi Deepak,

I guess in the meantime you solved your issue. Actually if you are using iLLD you should be able to use FreeRTOS without changing too much in your driver, because afaik all of the iLLD drivers have a sort of 'check if the resource is available' before using it.
This is done simply by setting a variable to 'in use' and setting back after the use. You might change these lines into a semaphore based mechanism by using take/give semaphore. There is something like 'Task notification' that works faster compared to Semaphores. However, it might be not
suitable for your if many tasks access the SPI interface at random points in time. But FreeRTOS is continuously developing and my knowledge might be outdated.

Best Regards
Markus
0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked
Hi deepakseshan1,

as Markus stated you need to be aware of all the tasks that are running in your application.
For an easy entry point, you should first install the FreeRTOS on your machine and just toggle some LEDs on the Triboard.
Then you should exercise with two threads using the same peripheral. You need to evolve a mechanism to lock the threads and or processes from each other
from using this peripheral at the same time. I think, that's the magic behind. Unfortunately, I am not aware of any FreeRTOS/QSPI example.
Just don't interfere threads or processes that are meant to do communication or other important tasks.

Regards,

Jens
0 Likes
Andrew_Q
Level 1
Level 1
5 replies posted 5 sign-ins First like received
Hi deepakseshan1,
I would do one task for the exclusive work with the hardware. And then the FreeRTOS queues.

Regards,
Andrew_Q
0 Likes
DSRnathan
Level 3
Level 3
50 sign-ins 25 replies posted 25 sign-ins
@ Marcus, I have got a FreeRTOS port which can used in Hightec compiler. Unfortunately the portable files are compiler specific especially for Tricore. Yes, there are some issue with context handling in the port files where i found the context switch handler function was broken. I can try and help for Hightec compiler but I have not tried ADS.
@Jens the toggling function is fine between the task to start with but switching and synchronisation mechanism has to be overlooked.
0 Likes