MQX Dspi

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

MQX Dspi

Jump to solution
1,389 Views
Garil
Contributor III

Hi folk, i have the kenetis demoboard twr53 also new in this mcu

i m trying using the spi2 on my board with an external chip which is active when the cs is high, in other way i m using the  ioctl cmd ( IO_IOCTL_SPI_READ_WRITE) which auto assert the chip.                                                                    __________

can someone please tell me how i can assert the chip "high" ? not low e.g not __                   __   but __|                      |__

                                                                                                                                                  |________|

Please look at the wave form if what i wrote not clear

thx in advance

0 Kudos
Reply
1 Solution
1,018 Views
BryGuyH
Contributor IV

Like a lot of parts of MQX the drivers often don't allow configuration of low level chip features. In this case the DSPI module driver for the kinetis chip set:

 

dspi_ptr->MCR |= DSPI_MCR_PCSIS(0xFF);

 

in the _dspi_polled_init function of the BSP. So you can either modify that for your application or else come back through after you do the fopen for the spi channel you are using and manually modify the SPIx_MCR register.

View solution in original post

0 Kudos
Reply
3 Replies
1,018 Views
Garil
Contributor III

Sorry guys, just wanted to give u my configuration

MQX 3.7, Codewarrior 10.1 pro, twr53n512 the 53 demoboard

thx

0 Kudos
Reply
1,019 Views
BryGuyH
Contributor IV

Like a lot of parts of MQX the drivers often don't allow configuration of low level chip features. In this case the DSPI module driver for the kinetis chip set:

 

dspi_ptr->MCR |= DSPI_MCR_PCSIS(0xFF);

 

in the _dspi_polled_init function of the BSP. So you can either modify that for your application or else come back through after you do the fopen for the spi channel you are using and manually modify the SPIx_MCR register.

0 Kudos
Reply
1,018 Views
Garil
Contributor III

many thx, sorry for the delay

br

0 Kudos
Reply