FAQ_MA35_Family_SWriter Guide USBH to SD1

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

26 Apr 2024, 16:50

Nuvoton provides another method to program firmware into MA35 device.
This guide will lead you how to use SWriter to program MA35 device from USBH to SD1.

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.png
FAQ_MA35_Family_Swriter Guide.png (38.98 KiB) Viewed 212 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 256MB 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_256mb.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 256MB 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_256mb.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
After programming, you may need to quick format it by Windows tool for Step 8.

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.
Duplicate all MA35D1 image files, along with the "config" file found in the MA35D1_SWriter_V1.01\Release\disk-content path. Verify that the file names match the one specified in the "config" file.
Below “config” shows that program files into SD1
Please input suitable parameters into the row TYPE, FLASH, and NAND_FLASH if you plan on programming an image into NAND.
The file programming addresses can be refer to pack.json in your image output/nuwriter folder.
The config file can be download as the below attachment
config.7z
(566 Bytes) Not downloaded yet
Step 9.
Switch power on setting PG0, PG2, PG3, PG4, PG5 to High, insert USB pen drive to USBH, and reset MA35 device. The result will be shown as below

Code: Select all

MA35D1 IBR 20211029
RTC power on
USBH Boot
USB Mass Storage device found.
header0 CRC OK!
Do DDR setting
TSI Connected
finish
Load TSI image... done
 
 
===============================================
         NuMaker Board Flash Writer
===============================================

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests