发帖
13 0 0

How to develop program for PB-03 series and burn the firmware?

master.chipset
中级会员

1

主题

5

回帖

216

积分

中级会员

积分
216
PB&TG系列 7990 13 2023-10-8 22:14:12
Hi everyone.
I need to implement PB-03 modules to make a BLE Mesh Network. The only source that exists for this purpose is
https://github.com/Ai-Thinker-Op ... /tree/release/pb-03
I know also that KEIL IDE is using for developing the firmware. But there isn't any tutorial for burning the firmware on PB-03.
I'll be glad if help me...
Thanks in advance
──── 0人觉得很赞 ────

使用道具 举报

Online learning gives students the flexibility to study from anywhere, but managing coursework, assignments, and deadlines can quickly become challenging. Many learners searching for do my online class are looking for practical ways to balance their academic responsibilities with work, family, or other commitments. Staying organized, following a structured study schedule, and using available academic resources can make a significant difference. This discussion explores common online learning challenges, effective time management strategies, and productivity tips that help students stay on track, reduce academic stress, and achieve consistent success throughout their online education journey.

<p>Online learning gives students the flexibility to study from anywhere, but managing coursework, assignments, and deadlines can quickly become challenging. Many learners searching for&nbsp;<a href="https://myassignmenthelp.com/take-my-online-class.html" target="_blank" rel="noopener">do my online class</a>&nbsp;are looking for practical ways to balance their academic responsibilities with work, family, or other commitments. Staying organized, following a structured study schedule, and using available academic resources can make a significant difference. This discussion explores common online learning challenges, effective time management strategies, and productivity tips that help students stay on track, reduce academic stress, and achieve consistent success throughout their online education journey.</p>
2024-1-18 12:59:08
master.chipset 发表于 2023-10-12 21:54
Hi again.
After 4 days of working on PB-03 firmware burning instructions, any instructions about UAR ...

Did This Helped You?
2023-10-22 16:53:05
Thanks, but any instructions about programming via UART didn't work for me at all.
So, I tested to write the program on PB-03M modules by SWD. I use J-Flash V7.50 to erase the chip and use Keil to program the chip. I could change the MAC Address of nodes by editing the code. I wrote "mesh_light" example on a chip and "mesh_gateway" example on another chip.
My current problem is in provisioning progress. During provisioning progress "mesh_light" node shows [Hard fault handler] error. Can you help me and say what's the problem?

øSDK Version ID 00030103
rfClk 0 rcClk 1 sysClk 1 tpCap[31 2b]
sizeof(struct ll_pkt_desc) = 8, buf size = 268
sizeof(g_pConnectionBuffer) = 268, sizeof(pConnContext) = 644, sizeof(largeHeap)=7168


Done.


Registered GATT Bearer Iface Events Appl Callback!

In Model Server - Foundation Models

Config Model Server Registration Status: 0x0000

In Generic OnOff Model Server

Generic Onoff Server Initialized. Model Handle: 0x0001

Light Hsl Server Initialized. Model Handle: 0x0002

Light Ctl Server Initialized. Model Handle: 0x0004

Vendor Defined Server Initialized. Model Handle: 0x0006

Registering with Provisioning layer...

Retval - 0x0000


Setting PHY MSH LIGHT as Complete Device Name!

Bearer type = 0x03(Bit0-adv, Bit1-GATT)

Serv Disable called with 0x00
Disabling Mesh Prov Service...

Service Disable yet to be Supported

Serv Enable called with 0x00
Enabling Mesh Prov Service...

Setting up Device for Provisioning ...

Binding with the selected device...

Retval - 0x0000

Retval - 0x0000


Setting up as an Unprovisioned Device

Recvd PROV_EVT_PROVISIONING_SETUP

Status - 0x0000

Attention TImeout - 30

Confirm Value Check Success!

sending random!

Recvd PROV_EVT_PROVDATA_INFO

Status - 0x0000

NetKey  :


-- Dumping 16 Bytes --

-------------------------------------------------------------------

9C 05 F4 98 59 7D 38 0E 8E 1D 0B 89 AC A4 C1 BA    ....Y}8.........

-------------------------------------------------------------------



Key ID  : 0x0000

Flags   : 0x00

IVIndex : 0x00000000

UAddr   : 0x0002


[Hard fault handler]
R0-R3        = 0x00000010 0x1fff0000 0x1fff82f9 0x1fffd370
R4-R7        = 0x1101c511 0x00000001 0x00000000 0x1101c189
R8-R11       = 0xffffffff 0xffffffff 0xffffffff 0xffffffff
R12,SP,LR,PC = 0x00000001 0x1fffd360 0x1fff28b5 0x00000000
PSR  = 0x60000000  ICSR = 0x00400003
[OSAL]idx 6 Func 0x1102663d systick 0000217d rtc 0002b342
-----------dump stack--------------

[1FFFD360]1101c511 fffffff9 00000010 1fff0000
[1FFFD370]1fff82f9 1fffd370 00000001 1fff28b5
[1FFFD380]00000000 60000000 00000464 1fff3fa3
[1FFFD390]00000000 00000000 00000006 00008595
[1FFFD3A0]0004f02c 1fffd3e4 00000464 00000464
[1FFFD3B0]1fff7ee8 00000000 1fff79a4 11032743
[1FFFD3C0]1fffd3e4 1fffd2e4 1fff7988 11032935
[1FFFD3D0]1fffd3e4 00000464 1fff7988 11031103
[1FFFD3E0]00000014 00000014 08000000 00001fff
[1FFFD3F0]95310000 002f1102 5f2c0000 00001103
[1FFFD400]00000000 00000000 00000000 00010000
[1FFFD410]00000000 00000000 00000000 10000000
[1FFFD420]08000000 00001fff c1390000 00031102
[1FFFD430]615c0000 00001103 00000000 00000000
[1FFFD440]00000000 00010000 00000000 00000000
[1FFFD450]00000000 13070000 7f000000 00001fff
2023-10-19 17:30:45
master.chipset 发表于 2023-10-16 15:22
Hi everybody.
I need PhyWriter.exe to change the MAC address of PB-03M modules. How can I download i ...

https://docs.ai-thinker.com/_media/ble/hardware/pb-download.zip
2023-10-19 17:28:45
master.chipset 发表于 2023-10-16 15:22
Hi everybody.
I need PhyWriter.exe to change the MAC address of PB-03M modules. How can I download i ...

https://docs.ai-thinker.com/_media/ble/hardware/pb-download.zip
2023-10-16 15:22:46
Hi everybody.
I need PhyWriter.exe to change the MAC address of PB-03M modules. How can I download it?
2023-10-14 19:20:36
master.chipset 发表于 2023-10-12 21:54
Hi again.
After 4 days of working on PB-03 firmware burning instructions, any instructions about UAR ...

Solved
I had forgotten to select "Erase Full Chip" option in "Options for Target > Utilities > Settings". Now, all of five PB-03 modules can be programmed/debugged.
So the result changed to:
...
Full Chip Erase Done.
Programming Done.
Flash Load finished at 14:38:06
2023-10-12 21:54:38
本帖最后由 master.chipset 于 2023-10-13 01:56 编辑

Hi again.
After 4 days of working on PB-03 firmware burning instructions, any instructions about UART programming didn't work for me.
I could finally find some instructions in "\components\keil" Chinese docx files of SDK V3.1.3 directory to prepare the Keil IDE for programming/debugging. I did any instruction exactly and I could build an example on Keil uvision V5.29.0.0 successfully.
I have five PB-03M modules. I tried to burn and debug examples on them but my present problem is that only two of them programmed/debuged successfully! Three of them can't be programmed anyway. The problem is same for three modules and after erasing flash they hang on programming progress and the progress bar shows they hanged on "1101C000H" address. I'm implementing PB-03M modules without any additional components and just connected to J-Link programmer directly.
What's the problem? I read in Chinese instructions that with bold and red text highly recommended to make sure "the board is in burning mode". How to do it? I have not seen this recommendation in any PB-03 series and PB-03 Kit series data sheets.
I even did some extra precautions like as using an external linear 3.3V power supply, adding a 22uF tantalum capacitor between VCC and GND, use very short wires for interfacing module to J-Link, testing various J-Link frequencies from 5KHz to 10MHz and even I tested with two different J-Link programmers. But the result is:
Target info:
------------
Device: PHY6222_FCDS
VTarget = 3.295V
State of Pins:
TCK: 0, TDI: 0, TDO: 0, TMS: 0, TRES: 1, TRST: 0
Hardware-Breakpoints: 4
Software-Breakpoints: 8192
Watchpoints:          2
JTAG speed: 4000 kHz
Include "D:\\PHY6252\\phy6222_v313_0512\\example\\ble_mesh\\mesh_light\\ram.ini"
FUNC void Setup(void) {
    _WDWORD(0x4000f0a8, 0x00000000);
    SP = _RDWORD(0x1fff1838);
    PC = _RDWORD(0x1fff183c);
_WDWORD(0x4000f0cc, 0x1fff1839);
}
LOAD .\Objects\mesh_light.axf  INCREMENTAL
Setup();
^
*** error 34, line 10: undefined identifier
Erase Done.
***JLink Error: Cannot read register 15 (R15) while CPU is running
***JLink Error: Cannot read register 20 (CFBP) while CPU is running
***JLink Error: CPU is not halted
***JLink Error: Cannot read register 15 (R15) while CPU is running
Programming Failed!
Error: Flash Download failed  -  "Cortex-M0"
***JLink Error: Communication timed out: Requested 3 bytes, received 0 bytes !
Could not transfer JTAG data.
Flash Load finished at 15:09:20

Before programming UART showed the below specifications:
################################################

arch:phy6252,NULL
company:Ai-Thinker|B&T
ble_mac:94c9601ea2ae
sdk_version:release/3.1.1
firmware_version:release/V1009
compile_timeec 30 2021 16:41:05

ready

################################################
您需要登录后才可以回帖 立即登录
高级模式
12下一页
统计信息
  • 会员数: 31215 个
  • 话题数: 42288 篇