MQX 4.0.2 can't open SPI2

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MQX 4.0.2 can't open SPI2

ソリューションへジャンプ
1,716件の閲覧回数
sandrobastos
Contributor IV

Hi,

I'm using TWR-VF65GS10 with IAR and MQX 4.0 and only can open SPI0 with "fopen ("spi0:", NULL)", if I try to open "spi1:" or "spi2:" the fopen() returns NULL.

Yes, I already enabled them im 'user_config.h', rebuilt, and I've checked in 'init_bsp' and they are being installed:

#if BSPCFG_ENABLE_SPI0

    _io_spi_install("spi0:", &_bsp_spi0_init);

#endif

#if BSPCFG_ENABLE_SPI1

    _io_spi_install("spi1:", &_bsp_spi1_init);

#endif

#if BSPCFG_ENABLE_SPI2

    _io_spi_install("spi2:", &_bsp_spi2_init);

#endif

My code is running at the A5 processor.

Any idea?

ラベル(3)
1 解決策
1,341件の閲覧回数
cyborgnegotiato
Senior Contributor II

Hi Sandro,

Your problem is in _io_spi_install which fail. This situation occurs because missing support for spi1 and spi2 in initialization function _bsp_dspi_io_init (tower board BSP has initializations for spi0, only) - this function simple return -1 (error).

Add code which setup iomux (for your spi connection) to the _bsp_dspi_io_init. It may be sufficient.

JM

元の投稿で解決策を見る

5 返答(返信)
1,342件の閲覧回数
cyborgnegotiato
Senior Contributor II

Hi Sandro,

Your problem is in _io_spi_install which fail. This situation occurs because missing support for spi1 and spi2 in initialization function _bsp_dspi_io_init (tower board BSP has initializations for spi0, only) - this function simple return -1 (error).

Add code which setup iomux (for your spi connection) to the _bsp_dspi_io_init. It may be sufficient.

JM

1,341件の閲覧回数
sandrobastos
Contributor IV

Hi, thank you all,

I'll use the SPI0 since its pins are available at the TWR connectors (they are repeated in TWR-SPI0 and TWR-SPI2); I thought SPI2 at TWR connector was connected with Vybrid DSPI2 but it isn't.

bye

0 件の賞賛
返信
1,341件の閲覧回数
timesyssupport
Senior Contributor II

If you used the MQX Installer for Linux to install your MQX sources, there was a patch applied to the MQX sources in order to prevent a device conflict if both Linux and MQX are running on the target. This patch changed the default DMA base pointers and SPI channels used by MQX. You can try reversing the attached patch if you are not using Linux on your target - but it probably is not the cause of the issue, as it affects DSPI0 functionality similarly to DSPI1. I would recommend contacting the MQX team to have their input on this issue.

Thanks,

Timesys Support

1,341件の閲覧回数
karina_valencia
NXP Apps Support
NXP Apps Support

juangutierrez can you check  previous update from Timesys and add your comments?

0 件の賞賛
返信
1,341件の閲覧回数
karina_valencia
NXP Apps Support
NXP Apps Support

timesyssupport  can you help on this case?