Page 1 of 1

CAL SPI AutoCS

Posted: Sat Jun 18, 2022 8:52 am
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

Re: CAL SPI AutoCS

Posted: Mon Jun 20, 2022 10:07 am
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 ;)