FAQ_MA35_Family_SWriter Guide SD1 to NAND

Post Reply
ytliu6
Posts: 97
Joined: 08 Nov 2022, 10:28

08 May 2024, 10:23

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-downlo ... ot-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
FAQ_MA35_Family_SWriter Guide SD1 to NAND.png (38.98 KiB) Viewed 100 times
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.

Code: Select all

{
    "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.

Code: Select all

{
    "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

Code: Select all

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
(551 Bytes) Downloaded 7 times
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

Code: Select all

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
===============================================

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Bing [Bot] and 1 guest