FAQ_MA35_Family_SWriter Guide SD1 to NAND

, May 08, 2024|
0
8481
0
Nuvoton provides another method to program firmware into MA35 device.
This guide will lead you how to use SWriter to program MA35 device from SD1 to NAND.

Download SWriter from Nuvoton official website
https://www.nuvoton.com/resource-download.jsp?tp_GUID=SW132023052903022822&currentFolder=/products/microprocessors/arm-cortex-a35-mpus/ma35d1-high-performance-edge-iiot-series/

Step 1.
Check the MA35D1 device layout if it can power USBH controller by IBR
The partial layout diagram is shown below

FAQ_MA35_Family_SWriter Guide SD1 to NAND.png (38.98 KiB)

Step 2.
Copy NuWriter_MA35.exe into “make-usbh-msc” folder

Step 3.
Choose the appropriate DDR image and alter the pack.json file. Take NuMaker-HMI-MA35D1 with 512MB for instance.
{
    "image": [
        {
            "offset": "0x0",
            "file": "writer_MBR.bin",
            "type": 0
        },
        {
            "offset": "0x400",
            "file": "conv/header.bin",
            "type": 0
        },
        {
	    "offset": "0x1000",
	    "file": "ddrimg/enc_ddr3_winbond_512mb.bin",
	    "type": 0
        },
        {
            "offset": "0x3000",
            "file": "otp_writer.bin",
            "type": 0
        },
        {
            "offset": "0x5000",
            "file": "usbh_writer.bin",
            "type": 0
        }
    ]
}
Step 4.
Choose the appropriate DDR image and alter the pack.json file. Take NuMaker-IoT-MA35D1 with 512MB for instance.
{
    "header": {
        "version": "0x20221124",
        "spiinfo": {
            "pagesize": "0",
            "sparearea": "0",
            "pageperblk": "0",
            "quadread": "0x00",
            "readsts": "0x00",
            "writests": "0x00",
            "stsvalue": "0x00",
            "dummy1": "0",
            "dummy2": "0",
            "suspintvl": "0"
        },
        "secureboot": "no",
        "entrypoint": "0x81000000",
        "image": [
        	  {
              "offset": "0x1000",
              "loadaddr": "0x28030000",
              "type": "2",
              "file": "ddrimg/enc_ddr3_winbond_512mb.bin"
            },
            {
                "offset": "0x3000",
                "loadaddr": "0x28000000",
                "type": "3",
                "file": "otp_writer.bin"
            },
            {
                "offset": "0x5000",
                "loadaddr": "0x81000000",
                "type": "4",
                "file": "usbh_writer.bin"
            }
        ]
    }
}
Step 5.
Use NuWriter_MA35 convert mode and pack mode to generate a new package for MA35 device.
You can also use a bat file and the content is shown below
NuWriter_MA35.exe -c header.json
NuWriter_MA35.exe -o stuff -p pack.json
pause
Step 6.
Prepare a USB pen drive and format it
Use Linux dd command or Windows programming tools to write the pack.bin into MA35D1 device

Step 7.
Make sure the image you prepare to programming is for the specific Flash
For example, the image which booting from SD0 can not be programed into SD1. You must clean whole image and rebuild a new one for SD1.


Step 8.
Below “config” shows that program files into SD/eMMC
Please input suitable parameters into the row TYPE, FLASH, and NAND_FLASH if you plan on programming an image into NAND. If the NAND Flash have been already in the NAND table read by CPU, no need to input it.
The file programming addresses can be refer to pack.json in your image output/nuwriter folder.
config.7z

config.7z (551 B)

Step 9.
Switch power on setting PG0, PG2, and PG6 to High, insert SD card to SD1, and reset MA35 device. The result will be shown as below
MA35D1 IBR 20211029
RTC power on
SD1 Boot
header0 CRC OK!
Do DDR setting
TSI Connected
finish
TSI Reset... done
TSI Sync, connected!
Load TSI image... done
 
 
===============================================
         NuMaker Board Flash Writer
===============================================