ColdFire 52259 SPI : MQX 3.6.1

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ColdFire 52259 SPI : MQX 3.6.1

743 Views
prvermas
Contributor I

One of projects that I am working on uses coldfire processor (52259) & MQX 3.6.1. As per new project requirements we need to add SPI functionality.

Problem that I am facing on enabling the SPI in the BSP & initializing the code is that I am not able to configure Chipselects other than CS0. I have tried the example code also on the M52259 evaluation board. Thanks in advance for your valuable comments.

0 Kudos
2 Replies

418 Views
soledad
NXP Employee
NXP Employee

Hi Pradeep,

The CS of SPI cannot be set via ioctrl, the command only set the SPI channel which should set the CS signal during reading or writing. After calling the ioctrl(), the CS will be set when doing the following read or write operation. The actually CS setting function is achieved by a callback function, please refer to the spi demo in C:\Program Files\Freescale\Freescale MQX 3.6\mqx\examples\spi, there is a set_CS() available for this purpose, the parameter of it includes cs mask and logic level, please note the cs mask here indicates the CS vaule defined in mcf5xxx_qspi_init_struct that may be referred from spi_mcf5xxx_qspi.h.
Hope this helps!!


Regards

Sol

0 Kudos

418 Views
prvermas
Contributor I

Thanks Sol, I was able to execute required cs signal.

Best Regards,

Pradeep

0 Kudos