MQX Dspi

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决
1,392 次查看
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 项奖励
回复
1 解答
1,021 次查看
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 项奖励
回复
3 回复数
1,021 次查看
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 项奖励
回复
1,022 次查看
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 项奖励
回复
1,021 次查看
Garil
Contributor III

many thx, sorry for the delay

br

0 项奖励
回复