Code: Select all
CPU Signal SerialFlash
P9 (PA22) SPCK 6 (CLK)
P10 (PA23) MOSI 5 (DI)
N10 (PA24) MISO 2 (DO)
L10 (PA25) NPCS0 1 (CS)
The state of fuses and buregs are:
sam-ba -p usb -d sama5d2 -a bootconfig -c readcfg:bscr -c readcfg:bureg0 -c readcfg:bureg1 -c readcfg:bureg2 -c readcfg:bureg3 -c readcfg:fuse
Opening serial port 'COM23'
Connection opened.
Executing command 'readcfg:bscr'
BSCR=0x00000000 / BUREG0
Executing command 'readcfg:bureg0'
BUREG0=0x00000000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET1
Executing command 'readcfg:bureg1'
BUREG1=0x00000000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET1
Executing command 'readcfg:bureg2'
BUREG2=0x00000000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET1
Executing command 'readcfg:bureg3'
BUREG3=0x00000000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET1
Executing command 'readcfg:fuse'
FUSE=0x00000000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET1
Connection closed.
For writing to the serial flash chip the softpack.bin file using SAM-BA over USB interface I use the following command:
sam-ba -p usb -d sama5d2 -a serialflash:xxxx -c erase:0x8000:0x58000 -c write:softpack.bin:0x8000
For reading from the serial flash chip I use following command:
sam-ba -p usb -d sama5d2 -a serialflash:xxxx -c read: softpack.bin:0x8000:70656
And now a question: what command line parameters I should use for the serialflash command?
I used the following table for SPI Serial Flash configuration
Code: Select all
Instance Peripheral I/O Set Chip Selects
0 SPI0 1, 2 0, 1, 2, 3
1 SPI1 1, 2 0, 1, 2, 3
1 SPI1 3 0, 1, 2
2 FLEXCOM0 1 0, 1
3 FLEXCOM1 1 0, 1
4 FLEXCOM2 1, 2 0, 1
5 FLEXCOM3 1, 2, 3 0, 1
6 FLEXCOM4 1, 2, 3 0, 1
sam-ba -p usb -d sama5d2 -a serialflash:3:1:0:33 -c read: softpack.bin:0x8000:70656
and
sam-ba -p usb -d sama5d2 -a serialflash:1:2:0:33 -c read: softpack.bin:0x8000:70656
In fact, I tried all the options, and SAM-BA could not connect to the flash…
As a result, I got the following error: Applet.qml: 232: Error: could not initialize the applet (status: 1)
What it means? How can I fix it? Help me, please. I’m open for any questions.