I built the matter lighting app on Ubuntu 20.04 LTS by referring to the github below.
https://github.com/NXP/matter/tree/v1.0.0.2-tag-nxp/examples/lighting-app/nxp/mw320
There was a problem with libusb, so I moved the bin file to Windows and wrote it using both J-Link commander and J-Flash lite.
boot2 0x1F00 0000 / mcufw 0x1F01 0000 / wififw 0x1F35 0000
After writing firmware, the following problem occurred.
__________________________________________________
<< MW320 MCU firmware: [lighting-app] >>
version: [2.9.11-001]
[0.002]CHIP:-: init mw320 sdk
CRC mismatch[psm] Warn: scan: Invalid obj (b2e4) at the end of data area off: 0 addr: A58
[0.211]CHIP:-: [PSM]: (start, len)=(0xa58, 0xf828)
__________________________________________________
Is there any way to solve this problem?
Should I use the generated flashprog.py?
Hi,
I'm going to try to replicate this on my side.
I'll let you know my findings.
Regards,
Daniel.
Hi,
Thank you for sharing the files.
I was able to flash the example with the files you shared with me using Ubuntu and flashprog. The only difference is that I used the OpenOCD and flashprog that came with the WMSKDA V6.0.r7.p3 bundle.
ubuntu@ubuntu1804:~/Desktop/wmsdka/wmsdka_bundle-V6.0.r7.p3$ ./sdk/tools/OpenOCD/flashprog.py -l ./mw320_sdk_copy/layout-4m.txt --boot2 ./mw320_sdk_copy/boot2.bin --wififw ./mw320_sdk_copy/mw32x_uapsta_W14.88.36.p172.bin --mcufw ./mw320_sdk_copy/chip-mw320-lighting-app.mcufw.bin
Example Running:
<< MW320 MCU firmware: [lighting-app] >>
version: [2.9.11-001]
[0.002]CHIP:-: init mw320 sdk
[0.199]CHIP:-: [PSM]: (start, len)=(0x330000, 0x10000)
[7.101]CHIP:-: mw320 init complete!
Could you please verify OpenOCD is correctly installed in your PC or try to flash it in the same way as me?
Regards,
Daniel.
Thank Daniel.
I'm currently having issues with libusb on Ubuntu 20.04 LTS.
Downloading to use the VM. Or I'm going to test it on my MacBook.
Q.
Is there a difference between how to use flashprog.py and openOCD and how to use j-link commander or J-Flash Lite?
Regards,
Bae.
Hi,
I'm sorry for the late response.
I was also able to flash the app using J-Link Commander.
I believe you might be missing to load the MCUFW, Wi-Fi FW and layout as a flash image. E.g. layout-4m.bin, not layout-4m.txt.
You can create your own flash partitions using the mw_img_conv.py file.
Please follow my steps in a command line:
1. Create your layout flash image: python mw_img_conv.py layout layout-4m.txt layout-4m.bin
2. Create a Wi-Fi FW flash image: python mw_img_conv.py wififw mw32x_uapsta_W14.88.36.p173.bin mw32x_uapsta_W14.88.36.p173.fw.bin
3. In J-Link commander flash the layout binary: loadbin <file_path>\layout-4m.bin 0x1F004000
4. Flash the Wi-Fi FW: loadbin <file_path>\mw32x_uapsta_W14.88.36.p172.fw.bin 0x1F350000
5. Flash the MCUFW: loadbin <file_path>\chip-mw320-lighting-app.mcufw.bin 0x1F010000
6. Reset the MW320
You should be able to run the example.
I hope this helps,
Daniel.