Hello everybody,
I'm trying to migrate my MQX / Vybrid / IAR project from TWR-VF65GS10 to Phytec PCM052.
I think the original BSP for TWR should work but it doesn't.
There are issues with NAND flash that is used to implement a FFS drive and also with the USB.
Is there anyone using this board with MQX?
My compiler is IAR.
MQX 4.1.1
thank you,
Solved! Go to Solution.
Sandro,
Which PCB version of the SOM are you working with? For example, 1374.0 or 1374.1?
There is an errata note for the 1374.0 PCB regarding NAND flash. See E02 here: http://phytec.com/wiki/images/c/c8/Errata_052_A0.pdf
Hello Sandro, good morning.
Do you mean you are using the exact same binary on PCM052 as on TWR-VF65?
There are some IOMux and possibly memory configuration differences.
I recommend you download the Phytec MQX release from their website below, and migrate your project.
The link below directs you to the Phytec Wiki, where you can always find the latest releases for PCM052:
BR,
Bruno
hi Bruno, how are you doing?
Yes, I know there are differences, that's the reason of this post.
The problem with the Phytec BSP is that it was made for MQX 4.0 and DS-5.
I've tried to create a new project based on BSP-TWR and replaced the key files with the Phytec ones but I couldn't build them, there are many errors.
Did someone manage to build Phytec BSP for IAR with MQX4.1?
cheers,
Sandro
Hi Sandro,
As Bruno mentioned, there are IOMux differences between the TWR board and phyCORE-Vybrid (PCM052). The issues you are having with USB could be related to this. For example, the issue could be related to VBUS control since on our board we use PTA7 as an enable for VBUS_USB0.
In our MQX port this was accounted for in mqx/source/bsp/pcm052_a5/init_gpio.c, functions _bsp_usb_host_io_init and _bsp_usb_dev_io_init
/* Setup PTA7 (control of VBUS) to power the bus */
GPIO4_PSOR = 1 << 6; //set output level of PTA7 (PORT4[6]) to "1"
IOMUXC_RGPIO(134) = IOMUXC_SW_MUX_CTL_PAD_PAD_MUX_MODE(0) | IOMUXC_SW_MUX_CTL_PAD_PAD_SPEED(0) | IOMUXC_SW_MUX_CTL_PAD_PAD_SRE_MASK | IOMUXC_SW_MUX_CTL_PAD_PAD_DSE(3) | IOMUXC_SW_MUX_CTL_PAD_PAD_OBE_MASK;
I am looking into your other questions and will provide an update as soon as possible.
Sandro,
Which PCB version of the SOM are you working with? For example, 1374.0 or 1374.1?
There is an errata note for the 1374.0 PCB regarding NAND flash. See E02 here: http://phytec.com/wiki/images/c/c8/Errata_052_A0.pdf
Hi Serah,
So far we could put USB and NAND to work. My project is already running in PCM052!
The next problem is QSPI; it also has the same connection in PCM as in TWR but it is not working.
I see the part numbers are different; do you think there could be some different initialization procedure for them?
TWR uses S25FL128S Spansion
PCM uses N25Q128A Micron
thank you,
I think that is likely the issue, I can take a closer look at the source code and post back here with an update.
What are you using to test QSPI? The FlashX driver?
I have been doing a little research about the FlashX driver, see Chapter 13 of the MQXIOUG. I took a quick look at mqx/source/io/flashx and do see a variety of Spansion flash support but not the Micron N25Q128A.
Hello speterson,
I'm using the QSPI driver, chapter 11 of MQXIOUG.
The MQX example I'm using is: "C:\Freescale\Freescale_MQX_4_1\mqx\examples\qspi\build\iar\qspi_twrvf65gs10_a5"
Since Phytec is using a Micron device in a board that is supposed to support MQX, there should be some example about this...
I've found a difference between them and correct (I think) in 'init_qspi.c' (BSP file); it's regarding to sector size and number of sectors:
static QuadSPI_FLASH_INFO_STRUCT _bsp_quadspi0_flash_device[]
0, | // Physical start address of the block of same size sectors | ||
256, | // The number of sectors with the same size in this block | ||
0x10000 | // The size of the sectors in this block |
The above is for the Micron (Phytec board).
The Spansion QSPI was 64 sectors of 0x40000 bytes each sector.
Before this change, it passed through erase routine in a few milliseconds (should be about 60s).
After the 'correction' the example changed its behavior and do not leave the erase routine.
regards
Hi Serah,
Yes, my SOM is 1374.0!
I did the workaround and the NAND example worked fine.
I can not understand why we were not advised about this before.
Thank you Serah.
I am sure I will need more help soon.
regards,
Hi speterson,
I have managed to build a BSP for PCM052 copying your files to a new project and making the necessary changes.
I built it for MQX 4.1.1.
The files I used (those that were different from BSP-TWR for MQX 4.0) are:
-init_bsp.c
-init_gpio.c
-init_hw.c
-init_pcb_shm.c
-init_sci.c
-init_usb.c
Then a 'bsp_pcm052.a' was created successfully.
When I try to build my project using this BSP, the follow error happens:
Error[Li005]: no definition for "_bsp_pre_init" [referenced from mqx.o(psp.a)]
Error[Li005]: no definition for "_bsp_init" [referenced from inittask.o(psp.a)]
Any idea to solve it? Do I need to change anything in PSP?
Does Phytec intend to upgrade its BSP for MQX 4.1?
Hi Serah,
Thank you very much for your support.
Ok, I saw these differences and I could make USB work merging your 'init_gpio.c' with the TWR one.
The problem is that your 'init_gpio.c' does not link with BSP project because there are some missing functions like:
_bsp_quadspi_io_init()
_bsp_flexcan_io_init()
_bsp_nandflash_io_init()
_bsp_adc_io_init()
These functions are present in the 'init_gpio.c' from TWR BSP.
Maybe because I am using MQX 4.1.1 and your BSP is for MQX 4.0...?
If I search for any mention to NAND or QSPI in your BSP files, there are no results - I wonder where are they beeing initialized?
What other files, besides 'init_gpio.c' I have to put in my BSP project?
Would you have a BSP for MQX 4.1.1?
thank you and best regards,
Sandro
karinavalencia, do you know if Phytec support is available on this community?
HI Bruno, I am not sure.
do you have the contact from them?