Post Go back to editing

SC589-MINI issues error at programming the flash.

Category: Software
Software Version: CCES 2.9.4


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?

Reinier van der Welle
Eminent Organs BV
The Netherlands

Top Replies

  • There is an alternate to the original bare metal framework available vis github:

    and a start of the documentation at:

    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:

    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.

  • Could you try the flash programming after you remove JP1 (make a note of how you had it installed) and cycle power to the board? I wonder if something that is booting is causing issues. The team has not seen any flash programming issues with the new revision. I have not specifically tried it with CCES 2.11.1 so will try that now. I just got a board yesterday so can take over the flashing issue and work with you.



  • Thanks for your reply. As I have mentioned above I was using the ICE1000 programmer, I apologise for my fault. Now I switched to the flash programmer and flashing seems to be OK.

    However, after flashing the SC589 Communications Port (COM4) disappears from the Device Manager Ports (COM & LPT) list. That port does not show up in the Device Manager/Other Devices list, as mentioned in the tutorial, but in the Ports list. So loading the Analog Audio Example to test the program is impossible. The COM Port can be brought back by pressing PB1+PB2 and Reset. I am using Windows 10 Pro 22H2.



  • Hi Reinier,

    Once you flash your application, you should no longer see the SC589 Comm Port in device manager unless you press PB1+PB2 because now it is your application that is running. Please correct me if I am misunderstanding.



  • Hi Chad,

    I did not try to flash my particular application, but reached the end of tutorial "Flash the bootloader and application". That application is running but does not give output when a signal is given to the input port. As I understand I should run the next topic in the tutorial named "Analog Audio Example" to hear music. But that is impossible because the COM port has gone. I have put the USB cable connector in the USB/UART port but that delivers a "CP2102N USB to UART Bridge Controller" port in Other Devices (which does not have a driver) and not a COM port. How can I run your Audio Example?



  • Hi  , 

    After you flashed the bootloader and application, can you confirm the following?

    1. Did you reset the board?

    2. After you reset the board do you see the orange LED10 blinking (should be once per second)

    3. Can you confirm which version of the ADSZ-SC589-MINI hardware you are running? (Can be found on the back of the board under the Part Number printed in the silkscreen) - Please note that versions greater than 1.5 haven't been included in the Wiki yet - so please be patient as those docs are lagging on newer hardware versions. 

    4. If the board is powered and you disconnect the USB-Micro side from the board, does your USB device list update and does CP2102N USB to UART Bridge Controller disappear (and re-appear if you reconnect to the board?

  • Hi  , I just noticed above you are using v2.1 (sorry I should have checked the above details). Just in case this step was missed, can you please ensure that you have the .inf file installed on the COM port as described in the Wiki (note the port name may differ due to the HW differences):

    Unzip the driver and right-click on the .inf file to install it. 

  • As a side note, please also ensure you are connecting to the USB/OTG connector for shell/terminal communication. This is the physical connection you will need to bring up the shell and run the audio example. If you are seeing CP2102N USB to UART Bridge then it likely means you are connected to the USB/UART connector which is mainly used for UART reflash via our flasher utility. 

  • Hi rbutler,

    To answer your questions:
    After flashing the bootloader and pressing the reset button, the green LED9 is on.
    After pressing PB1+PB2 and Reset: LED10 starts blinking (LED9 remains on and LED11 is off).
    The 'CP22102N USB to UART Bridge Controller port' shows up when I connect the USB/UART port to the PC, which is incorrect. It was just a try to see what happens. I know I have to use the USB/OTG port, then I get a COM port on my PC.
    Yes I have installed the proper driver (.inf file), otherwise it was impossible to flash the board.

    I have carefully followed your tutorial up to and including "Flash the bootloader and application". Under "Application Flash via SAM Flasher", instruction 8 says "To enter the application, press the RESET button on the SAM again. If the application has properly loaded, LED10 will blink and LED11 will remain on. You will be able to additionally access the shell."
    And that is not the case, on pressing Reset, LED10 blinks two times and goes off. LED11 was and remains off, only LED9 is on. I have repeated flashing the board with the same result. Maybe that is the issue: resetting the board (PB1+PB2 and Reset) does not switch on LED11, only LED10 starts blinking.