Hello,
I am using MQX_V5 for IAR IDE. I am using MQX package provided example spi_master.
I am using our own development board. External Data flash is connected to SPI3.
I did following changes.
1. added definitions of pins in BOARD_InitPins(); of BSP. these are right, because same pins working with NXP bare metal examples.
2.Enable SPI in user_conifg.h
#define BSPCFG_ENABLE_LPSPI3 1
3. Still TEST_CHANNEL is not assigned by "spi3:" by following code snipped.
#elif BSP_SPI_MEMORY_CHANNEL == 3
#if ! BSPCFG_ENABLE_SPI3
#error This application requires BSPCFG_ENABLE_SPI3 defined non-zero in user_config.h. Please recompile kernel with this option.
#else
#define TEST_CHANNEL "spi3:"
#endif
4. so, I added #define BSPCFG_ENABLE_SPI3 1 in user_conifg.h
Now, it is assigned "spi3:" to TEST_CHANNEL
3. but finally at following code, not opening port. Execution reach at task_block() line.
/* Open the SPI driver */
spifd = fopen (TEST_CHANNEL, NULL);
_io_printf("channel = %d",channel);
if (NULL == spifd)
{
printf ("Error opening SPI driver!\n");
_time_delay (200L);
_task_block ();
}
Is there any settings required to Open SPI Port?