I'm having trouble getting a program to run on a custom board based around the MIMXRT117FCVM8A. Please could someone help?
I'm trying to run the evkmimxrt1170_igpio_led_output_cm7 and snl_vizn3d_iot_iled_blinky_cm7 projects with limited success. Both these projects have been modified to use the GPIO assignment used for the LED on my board, but are otherwise original. I have tried modifying the RAM entries in the memory configuration but I haven't been able to run the code from Flash. The evkmimxrt1170_igpio_led_output_cm7 project works if I remove the flash entry from the memory map, and in this case the program runs from SRAM.
I've seen some previous posts which suggested that the addresses 0x2015f2 and 0x223104 are purely a debugger issue, and that the code would run from flash without a debugger, but in my case it doesn't run from flash without the debugger either.
Some information about my hardware:
Flash: IS25LP128-JBLE
SDRAM: W9825G6KH
Oscillators: 24MHz crystal, 32.768kHz crystal
I am using a JTAG connection and have an NXP MCULink and a Segger J-Link; the problem is the same with both.
I don't currently have an i.MXRT1170 dev board so I'm not able to try running the exact same project on the dev board, as I have an i.MXRT1160 dev board.
Flash is connected as follows:
Flash CLK - FlexSPI_A_CLK | G14 |
Flash CS - FlexSPI_A_SS0 | F17 |
Flash IO0 - FlexSPI_A_D0 | F15 |
Flash IO1 - FlexSPI_A_D1 | H15 |
Flash IO2 - FlexSPI_A_D2 | H14 |
Flash IO3 - FlexSPI_A_D3 | F16 |
The BT_CFG pins are needed for other functions, so I am using Boot from Fuses by setting the BOOT_MODE pins to 00. I've used a DIP switch on the BOOT_MODE pins so that I can also access the Serial Downloader (USB). I've used NXP MCU Boot Utility to set fuse 0x960[4] (BT_FUSE_SEL) to 1 and I've left all other fuses in their default state. I believe this should be the correct configuration to boot from an external QSPI Flash on FLEXSPIA, and activity is seen on the Flash pins when resetting the board.
The various configuration pins are connected as shown in the table below on my board. I wouldn't expect the BOOT_CFG pins to matter if I'm using boot from fuses, but I've included them in the table below for reference.
Function | My board |
U10 - ONOFF | 10k to VDD_SNVS_ANA |
T8 - WAKEUP | 10k to VDD_SNVS_ANA |
T10 - POR | Active low reset |
T9 - PMIC_STBY_REQ | Floating |
U9 - PMIC_ON_REQ | 10k to VDD_SNVS_ANA |
T11 - TEST_MODE | GND |
T7, P6 - BOOT_MODE | 00 (boot from fuses) (connected to DIP switch) |
C9 - BOOT_CFG[11] | Floating |
C7 - BOOT_CFG[10] | Floating |
D7 - BOOT_CFG[9] | Pulled down |
E9 - BOOT_CFG[8] | Pulled down |
F8 - BOOT_CFG[7] | Pulled up |
E8 - BOOT_CFG[6] | Pulled up |
A14 - BOOT_CFG[5] | Pulled up |
B14 - BOOT_CFG[4] | Pulled up |
C13 - BOOT_CFG[3] | Pulled up |
A15 - BOOT_CFG[2] | Pulled up |
E12 - BOOT_CFG[1] | Floating |
D10 - BOOT_CFG[0] | Floating |
Power rails are as below:
Pin | My board |
R12 - VDD_LPSR_IN | 3V3 |
J13 - VDDA_ADC_3P3 | 3V3 |
G16 - ADC_VREFH | 1V8 |
K15 - VDDA_ADC_1P8 | 1V8 |
M11 - VDDA_1P8_IN | 1V8 |
M5, N5, L5 - DCDC_IN | 3V3 |
M7, M8, M6 - DCDC_ANA (out) | 1V8 |
K8, K9, L8, L7 - DCDC_DIG (out) | VDD_SOC (1V) |
H8, H9, H10, J8, J9, J10, K10 - VDD_SOC_IN | VDD_SOC (1V) |
F7, F6, G6 - NVCC_EMC1 | 3V3 |
H6, J6 - NVCC_EMC2 | 3V3 |
P7 - NVCC_LPSR | 3V3 |
M12 - NVCC_GPIO | 3V3 |
D12 - NVCC_DISP1 | 3V3 |
E7 - NVCC_DISP2 | 3V3 |
D14 - NVCC_SD1 | 3V3 |
G13 - NVCC_SD2 | 3V3 |
F9 - VDD_MIPI_1P8 | 1V8 |
F10 - VDD_MIPI_1P0 | 1V (from VDD_SOC) |
U12 - VDD_SNVS_IN | 3V3 |
U11 - NVCC_SNVS | VDD_SNVS_ANA |
H12 - VDD_USB_1P8 | 1V8 |
G12 - VDD_USB_3P3 | 3V3 |
The Flash appears to be getting programmed with data after trying to run a debug session. I can read it back with NXP MCU Boot Utility and see what looks like all the expected blocks of data:
- 0x30000400 - starts "FCFB", FlexSPI Configuration Blocks
- 0x30001000 to 0x3000102B - starts with 0xD1 as the first byte, IVT header
- 0x30002000 to 0x300090f0 - the start of this section looks like an ARM startup file
- 0x30010000 to 0x30082490 - looks like program code
Attached is the current memory map that I'm using and all the fuse values.