Main Menu

Recent posts

#21
ARM Cortex / SPIFI with LPC1857
Last post by Suresh - September 20, 2021, 10:13:17 PM
Dear Concern,

We are trying to interface WinBond W25R128JV with LPC1857. We have successfully achieved programming the same using JTAG and OpenOCD but we are facing problems in programming the same with flash magic UART and bootloader. As we looked onto this forum we have made all the necessary changes to the best of our knowledge but in vain.

  • We have taken the LPC1857 Keil example and modified the sector size from 256KB to 4 KB that is relevant to present SPIFI. We have cross checked the addressing values with the IRAM and IROM on the Keil "options for target" We have generated hex file and placed in the folder and it appears as valid. Now we used hardware pins P2.9, 2.8, 1.2, 1.1 as low. We have made ISP pin P2.7 as low and reset the board.
  • It goes into ISP mode and we have tried to use program an application and the bootloader we have created but Flash Magic stops abruptly and closes itself or it gives error message "Bootloader in RAM is not executing(2)"
We have few doubts on the above setup actually.

  • We are using Just U0 RX, Tx and gnd to interface. After thorough research by seeing keil mcb schematics we found that RTS and DTR signals are being used but not in any other Schematics of Keil MCB boards. Do we really require?? If yes, what is the role?
  • Can you briefly explain the steps to be followed on hardware and software to successfully acheive

Awaiting for your reply
Regards
R Suresh





#22
ARM Cortex / Re: Customized bootloader for ...
Last post by sonam chouhan - August 29, 2021, 10:27:52 PM
I have gone through both MX25L1633E and MX25R6435F but did not find any software-related difference. My customized bootloader code runs in MX25L1633E successfully but failed in MX25R6435F.

By debugging the code, I found that the operation failed from the initial stage Memory_init(). In our MCUxpresso code, we observed the same failure. Can it be the spifi_drv_M3.lib issue?

FYI, we are able to flash the image via JTAG in MX25R6435F.
#23
ARM Cortex / Re: Customized bootloader for ...
Last post by Andy Ayre - August 25, 2021, 09:24:45 AM
It would be best to compare the datasheets of the two devices and look for differences. Andy
#24
ARM Cortex / Re: Customized bootloader for ...
Last post by sonam chouhan - August 25, 2021, 12:16:30 AM
Thanks for your kind support.

With a correct RAM address mapping, my customized BL is working fine for the Winbond flash ROM.

Quick concern: If a flash ROM having almost the same features as the supported QSPI device for LPC1833, then would the same customized BL work for the similar featured flash ROM?

Or there is any specific change required in the sample code?
#25
ARM Cortex / Re: LPC1833 external SPI flash...
Last post by Andy Ayre - August 19, 2021, 08:53:24 AM
You don't find the RAM location, you choose the RAM location. You can put the bootloader at any location in RAM that you wish. The only requirement is that the start address in the descriptor matches your linker map file. The descriptor tells Flash Magic where in RAM to download the bootloader to and start execution from.

Andy
#26
ARM Cortex / Re: LPC1833 external SPI flash...
Last post by krunalrao - August 19, 2021, 05:40:13 AM
I am very much aware that sample code is not a plug-and-play type.  I believe providing any information on the sample code will be okay for you. In the sample code, in the comment below lines are mentioned.

erasing, programming and verifying of SPIFI flash S25FL129P on
// Hitex LPC1800/LPC4300 evaluation board
// Adapted from code in NXP SPIFI Read/Write example
// see: http://sw.lpcware.com/?p=lpc18xx.git&a=tree
// $Id: FlashPrg.c 3895 2015-05-14 13:06:10Z andy $

I am not able to log in to this mentioned website. Do you have an NXP link for the same?

I assume that this andy is you only. S? now below is my main concern.

How can I find the exact RAM location to store the bootloader code.

I have tried the below code of descriptor, that does not work.

  0x80000000,                                  // programmable memory start address
  0x801FFFFF,                                  // programmable memory end address
  0x10000500,                                  // ram start address (for bootloader storage)
  0x10001FFF,                                  // ram end address (for bootloader storage)
  0x1000,                                     // programmable sector size in bytes
  0xFF,                                        // programmable memory erased value
  256,                                         // number of bytes to program at once
  115200,                                      // communication baudrate
  DESCRIPTOR_BOOTSTRAP_CORTEXUART,             // use ISP to download this bootloader
  115200,                                       // baudrate to use for downloading bootloader
  0,                                           // ram address for commmand mailbox (0 = not used)
  0,                                           // ram address for response mailbox (0 = not used)
  0,                 

To clear more, I am not asking something that I need to develop. I am asking which is already there in the sample code.

Looking forward to some detailed explanation!!!

Thanks in advance!!

Rao
#27
ARM Cortex / Re: LPC1833 external SPI flash...
Last post by Andy Ayre - August 18, 2021, 09:14:32 AM
We provide examples for users to adapt. If you go down the route of adapting then we don't have your changes or your hardware so you will have to debug it yourself. The support for external flash is not plug-and-play because of all of the variables - it's a development task.

Andy
#28
ARM Cortex / Re: LPC1833 external SPI flash...
Last post by krunalrao - August 17, 2021, 10:05:44 PM
I have mapped RAM Location with the LPC datasheet and the address is correct only. Really appreciate it, if you can simplify your answer.
#29
ARM Cortex / Re: LPC1833 external SPI flash...
Last post by Andy Ayre - August 17, 2021, 09:02:04 AM
The RAM location is the sixth entry in the descriptor. This is where the interrupt vectors need to start. Andy
#30
ARM Cortex / LPC1833 external SPI flash bo...
Last post by krunalrao - August 17, 2021, 03:55:35 AM
I have tried the same example (\Flash Magic\Bootloaders\External Memory\LPCxpresso18S37) in my LPC1833 board with flash ROM MX25L3233FM2I by changing the descriptor file, but it does not work.

I am new to the LPC18xx controller. In an earlier post, I read that the bootloader code needs to be store in the RAM location not in flash.

How can I find the exact RAM location to store the bootloader code?

I have tried the below code of descriptor, that does not work.

DESCRIPTOR_HEADER,                           // must be DESCRIPTOR_HEADER
  DESCRIPTOR_VERSION,                          // must be DESCRIPTOR_VERSION
  BOOTLOADER_FUNC_BASIC,                       // bootloader functionality (ORing of BOOTLOADER_FUNC_xxx)
  VERSION,                                     // version number of bootloader
  0x80000000,                                  // programmable memory start address
  0x801FFFFF,                                  // programmable memory end address
  0x10000500,                                  // ram start address (for bootloader storage)
  0x10001FFF,                                  // ram end address (for bootloader storage)
  0x1000,                                     // programmable sector size in bytes
  0xFF,                                        // programmable memory erased value
  256,                                         // number of bytes to program at once
  115200,                                      // communication baudrate
  DESCRIPTOR_BOOTSTRAP_CORTEXUART,             // use ISP to download this bootloader
  115200,                                       // baudrate to use for downloading bootloader
  0,                                           // ram address for commmand mailbox (0 = not used)
  0,                                           // ram address for response mailbox (0 = not used)
  0,   

               
Could anyone please provide some details to design the bootloader code?