Other Parts Discussed in Thread: HALCOGEN
Tool/software: Code Composer Studio
Hi :
I have a question:
By set CSHOLD = 1 in last buffer, the CS pin can be hold active,
but after transmit finish, how to go to set the CS pin go to deactivate status?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio
Hi :
I have a question:
By set CSHOLD = 1 in last buffer, the CS pin can be hold active,
but after transmit finish, how to go to set the CS pin go to deactivate status?
Hello,
CSHOLD Bit has different meanings for Master and Slave mode. In Master mode, if the CSHOLD bit is set in the control field of a word, the chip select signal will not be deactivated until the next control field is loaded with new chip select information. For Slave mode in Multi-buffered mode, if the CSHOLD bit in a buffer is set to 1, then the MibSPI does not wait for the SPICS pins to be deactivated at the end of the shift operation to copy the received data to the receive RAM. With this feature, it is possible for a slave in multi-buffer mode to do multiple data transfers without requiring the SPICS pins to be deasserted between two buffer transfers. When the slave is in Compatibility mode, the slave does not require the SPICS pin to be deasserted between two buffer transfers. The CSHOLD bit of the slave will be ignored in compatibility mode. This is described in Section 28.2.6.5.2 of device TRM ( )
Which version of HALCoGen are you using? In the las version of HALCoGen there is two check boxes for Chip Select Hold.
One is for holding CS active after transmission of each buffer and the other is to hold CS active after transmission of last buffer.
Best regards,
Miro
Hello:
I used in master mode. and i did not use the HALCoGen tool, i directly use register.
The background of this question is bellow:
Configure TG0 (size is 65 word), there is one transaction need 130 word, so need TG0 transmit two times.
but i found CS goto deactivate after first TG0, So the also configure CSHOLD in last tx buffer control.
pMibspiRam->tx[e_count-1].control |= (uint16)((uint16)1 << 12U);
By this way, CS not goto deactivate, but after totally finish, CS can not goto deactivate, this is wrong.
Could you help me how to make CS deactivate?
Hello,
Try with clearing CSHOLD bit after your last transaction.
Best regards,
MIro