Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - mtbrown5264

#1
Hello,

I'm using Flash Magic (v9.81.4250) to program flash for an LPC4357 chip on the Keil MCB4300 dev. board. I'd like to be able to program the flash using ISP via the UART0 port, so I have the following configuration:

J4A-B (P2_9, P2_8, P1_2, P1_1) are set to LOW
J13 and J16 are in position 1-2
J17 (UISP) is connected / ON
J18 (URST) is connected / ON

As per the Keil MCB4300 configuration instructions found here: http://www.keil.com/support/man/docs/mcb1800/mcb1800_su_configuring.htm

I've verified this configuration with the LPC4357 user's manual available at: http://www.nxp.com/documents/user_manual/UM10503.pdf

In the Flash Magic GUI, I have the following settings for the M4 core project (hex file generated from LPCXpresso):

Device: LPC4357
Flash Bank: Bank A (0x1A00 0000)
COM Port: COM 1 (I've verified this is the correct COM port)
Baud Rate: 9600
Interface: None (ISP)
Oscillator (MHz): 12
Erase all Flash
Verify after programming
Activate Flash Bank

My settings for the M0 core project are similar, except it's set to Flash Bank B (0x1B00 0000) (and a different hex file, of course).

With this setup, I'm able to run ISP blank checks, read security, display memory, and erase flash on both flash banks, read the device signature, and verify both hex files. I'm also able to use the 5-step programming method to successfully write the flash to bank B. Whenever I attempt to do the same for bank A, Flash Magic becomes unresponsive for about 5 minutes, then it goes through the regular programming steps and claims that it succeeded. However, when I display the memory after performing these steps, it show that only about 4 bytes have been changed, and the rest are still 0xFF for both flash banks. Needless to say, the board/chip is not running my program.

Has anyone else encountered a similar issue with either the LPC4357 or the MCB4300? Has anyone successfully programmed the flash and launched the LPC4357/MBC4300 from Flash Magic?

Edit (07/25 16:10): I'm running Windows 8.1; and in case it wasn't clear, the hex file for the M4 core project is being loaded into flash bank A and the hex for the M0 core project is being loaded into flash bank B. Both hex files were generated using the debug build configuration in LPCXpresso.

Edit (07/25 16:24): I've tried eliminating some variables by switching to one of the LPCOpen sample projects (periph_blinky, M4 core only). I generated hex files in both the debug and release build configurations. This time, it appears that the chip is successfully programmed in both cases (same settings as before) with no unresponsive delay, but the memory display shows the same results as with the previous project.

Edit (07/25 17:38): My colleague and I have identified the issue. I had been generating the hex file incorrectly. For those of you that are interested, you can generate the proper hex file by adding the following line to the post-build steps:

arm-none-eabi-objcopy -v "${BuildArtifactFileName}" -O ihex "${BuildArtifactFileBaseName}.hex"

Other than that, the setup described above is sufficient to program the flash for the NXP LPC4357 on the Keil MCB4300 dev. board.