cancel
Showing results for 
Search instead for 
Did you mean: 

How to send SPI command by "PIT" every milisecond ?

Bgh.1
Associate II

hello everyone;

I’m trying to send some SPI command by SPC560 microcontroller. During the main program I must send a special code regularly, for example I must send the code “0xAAAA�? and “0xBBBB�? every 20mS. Actually when the main program is running, if 20mS happened, the main program must stop and send code�?0xAAAA�? and then come back to the last point of the main program.

0693W00000JOOljQAH.pngI try to do this project with PIT, but I can’t reach to desired result.

how can I solve this problem?

with regards

Bahareh

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 REPLY 1
ODOUV.1
ST Employee

Hello,

you can configure the PIT at 50 Hz (20 ms period)

then in you interrupt management, one time you send a 0xAAAA, next time you send 0xBBBB

Best Regards,

-Olivier