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?
解決済! 解決策の投稿を見る。
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
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
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
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
juangutierrez can you check previous update from Timesys and add your comments?
timesyssupport can you help on this case?