Post Go back to editing

SC589-MINI issues error at programming the flash.

Category: Software
Software Version: CCES 2.9.4

Hi,

About two years ago we have used the SC589-MINI board to run a convolution app; it runs fine.
Now we bought the same board version 2.1 and tried to program the flash with the existing unmodified app using "prog_SAM_flash_ice1000.bat <app-name>", which resulted in
"Error: failed erasing affected sectors" and led1 is on (red).

This error appears at the beginning of flashing after the ldr file is written; no "running dots" are seen.
Next we have rebuild app-name_Core0, app-name_Core1.dxe, app-name_Core2.dxe and tried to program the flash again with the same result.

Finally we tried to run the app with CCES2.9.4 Debug. The program seems to load properly, but does not run.

Which difference(s) between board version 2.1 and the former one 1.5 could cause this issue?

Regards,
Reinier van der Welle
Eminent Organs BV
The Netherlands

Parents
  • There is an alternate to the original bare metal framework available vis github: github.com/.../sam-audio-starter

    and a start of the documentation at:  https://wiki.analog.com/resources/tools-software/sharc-audio-module/advanced-audio-projects

    The flash driver should be the same one as used for the rev 1.5 boards (older versions may have a different flash device).  The rev 2.1 board was created to address component shortages with building the rev 1.5 boards.  The clock generator chip was replaced with discrete oscillators, there is a different USB UART device,  and there is also a different Ethernet PHY.  The sam-audio-starter project runs on both boards and is a good test.

    There is a bootloader included and in the prebuilt folder: https://github.com/analogdevicesinc/sam-audio-starter/tree/1.0.0-Github/bootloader/prebuilt

    the bootloader consists of 2 ldr files - once those 2 loader files are programmed in, then it is possible to reflash the board via a USB cable connected to the OTG port and using the "SAM Flasher" utility. (see instructions on the wiki). 

    This has been tested with a newer version of CCES - it might be worth also installing the latest version of CCES (it will co-exist with your older version).

  • Thanks for your reply. I have made a CCES (2.11.1) project: SAM-Audio-Starter and did the steps from Advanced Audio Projects: Set up pre-requisites, then Set up environment and compile, all without problems. Then Flash the bootloader and application, but execution of "./boot0_hw_rev_1_5_cldp.bat" shows the message "Error: failed erasing affected sectors". An ICE1000 has been used and I have modified the .bat scripts (-emu 2000 to -emu 1000). What could be the cause?

    Thank you for your help.

  • Hi  , yes, you can clean the project first by running make clean. Then rebuild the project by running make.

    I did do some digging yesterday as well and I do agree. I think right now we are getting stuck in the first stage bootloader. I think the bootloader is expecting to jump to the main application after we reset, but for some reason, that is failing and that is why we are seeing the two blinks and then nothing. So I think it could be possibly a couple of things:

    1. The SAM flasher indicated that the flash was successful (but maybe it wrongly wasn't) -> I want to check the contents of the flash by reading back the LDR and comparing it with the LDR that was built. 

    Or

    2. The configuration of the external flash is in a different state than expected, that may not be compatible with the settings we are trying to use to load the application -> I want to read back the external flash configuration registers and check against our expected settings.

    Or

    3. The SPI pins connected to the external flash are not in the proper muxing state for some reason -> This we would need to probe the hardware.

    One more easy thing we could try before we check out these three options, is to simply try running a debug session in crosscore -> the external flash code will be set up by the EXE/DXEs so this may test theory #2 easily for us. If you are comfortable in CCES, instead of trying to run the application from a SAM flash, can you try loading the DXEs and running the code from the debugger instead and see if you can connect to main that way? (Note, please disable semihosting, under automatic breakpoints). Please let me know if you need more details on how to set up the session. 

  • Hi Rebecca, to be complete regarding your comments from August, 11:  I have run "make clean", created a new .ldr, flashed it using the SAM flasher and obtained the same results, as expected.


    I am reasonably comfortable in CCES (having used it for former EZKIT boards as 21469, 21569, SC589) but did not succeed in using the DXE's in the debugger. Please send me more details how to proceed. Thanks.

  • Hi  , I have added some instructions to our Wiki to help you establish a debug session: https://wiki.analog.com/resources/tools-software/sharc-audio-module/advanced-audio-projects/debug-session?rev=1692098117#debug_session_-_adzs-sc589-mini 

    Please follow these instructions to run the code from the debugger. Once you hit run, please let me know if you are able to access the shell. 

  • Hi  , I was also wondering if you would be willing to share your app-name_Core0, app-name_Core1.dxe, app-name_Core2.dxe (just executables, no source code) so that we can try and reproduce the same issue here? 

  • Hi Rebecca. At the outset I have tried to load the.ldr file used with former versions of the MINI board. Loading was tried using the ICE1000 interface. The app-name was "Convolution_6". ggeerling mentioned the differences between the 1.5 and 2.1 boards. Then I switched to GitBash and so on.
    The present app names are just the same as in your tutorial: SAM-Audio-Starter.ldr, SAM-Audio-Starter-ARM.exe, SAM-Audio-Starter-SHARC0.dxe, SAM-Audio-Starter-SHARC1.dxe.

  • Hi Rebecca, I have followed your tutorial on Setting Up a Debug Session in CCES and have run Debug. The software has been properly loaded (four times message "Load complete"), but the LED on the ICE-1000 does not turn back to green. So no running board; no connection with a COM port, and the 'CP22102N USB to UART Bridge Controller port' is shown when the USB/UART port on the board is used.
    This first test was with the makefile without the -DUSB_CDC_STDIO flag. I have included that flag again, did make clean and an new build and obtained identical results.

    As I have three MINI boards available I have tested the other two with identical results; so no hardware errors, I suppose. A slight difference because the boards are used for the first time, at power up: LED9 and 11 are on, LED10 is blinking, LED7 is on. After loading only LED9 is on; after reset the former situation with LEDS 9, 11, 10 and 7.

  • Hi  , when you start a debug session, we don't expect the debugger light to change back to green. It should remain purple for the time that the session is running. After you loaded the ARM DXE, did your debugger halt at main? And if so, after this, did you hit the run button to run the code? Can you share a screenshot of your CCES after you start the debug session please? 

  • Is the app 'Convolution_6' and application that you wrote? Or is that an application that ADI provided? Do you know if this was based from the Baremetal framework? 

  • Yes, I have written that app; it is not from ADI. The last version (_6) was based on the Baremetal framework.

  • I only see a window Debug Configurations (Screen1). When the Debug button is clicked, the four programs are loaded (Screen2, console view). All windows are empty,  I do not see a run button or any code or whatsoever.  I am sorry, I have tried to upload the screenshots using Insert > Image/video/file, but did not succeed.

Reply
  • I only see a window Debug Configurations (Screen1). When the Debug button is clicked, the four programs are loaded (Screen2, console view). All windows are empty,  I do not see a run button or any code or whatsoever.  I am sorry, I have tried to upload the screenshots using Insert > Image/video/file, but did not succeed.

Children