CAL SPI AutoCS

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
mnfisher
Valued Contributor
Posts: 938
http://meble-kuchenne.info.pl
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 502 times

CAL SPI AutoCS

Post by mnfisher »

It might be my reading of this - in the cal_spi (AVR here) if AutoCS is set to 'yes' - the component should handle pulling CS 'active' on a Transaction.

If AutoCS is 'no' - then it is the user responsibility to pull CS low - transmit - then high.

However - if AutoCS is set to 'no' then Master_Enable_Cs and Master_Disable_CS do nothing - all code pre-processed out (apart from a superfluous string variable being created)

If AutoCS is 'yes' then Master_Enable/Disable_CS do Set_Port_Pin as expected - but the user needs to call them before and after Master_Transaction - as this doesn't toggle the CS pin.

Martin

BenR
Matrix Staff
Posts: 1707
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: CAL SPI AutoCS

Post by BenR »

Hello Martin,

AutoCS is maybe slightly misleading, DefineCS might have been more applicable. The thought behind it is as follows.

AutoCS = Yes - The CAL component defines the CS pin and tthe Enable/Diable comp macros will enable and disable the pin - current standard mode.
AutoCS = No - The CAL component knows nothing about the CS pin and the functionality is provided elsewhere - legacy mode.

Currently the transaction macro will never assume and drive the CS pin by itself.

Hope this helps ;)

Post Reply