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

[复制链接]
查看1442 | 回复11 | 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
回复

使用道具 举报

WangChong | 2023-10-8 23:00:54 | 显示全部楼层
Welcome to Ai-Thinker blog. We are very happy to help you.
You may able to visit this website for seaching solusion.
  1. https://docs.ai-thinker.com/blue_tooth_pb
复制代码

This is this instruction about how to code by using PB-03
  1. https://docs.ai-thinker.com/_media/ble/pb-03/phy62xx_3.x.x_ans.zip
复制代码

This is burning tool that
  1. https://docs.ai-thinker.com/_media/phypluskit_v2.5.2b.zip
复制代码


This is instructionabout how to burn
  1. https://www.kancloud.cn/aithinker/ble_mesh/2620976
复制代码


if you have more questions , you can publish a new log and ask .

回复 支持 反对

使用道具 举报

496199544 | 2023-10-9 10:27:51 | 显示全部楼层
回复

使用道具 举报

master.chipset | 2023-10-9 15:26:13 | 显示全部楼层
WangChong 发表于 2023-10-8 23:00
Welcome to Ai-Thinker blog. We are very happy to help you.
You may able to visit this website for se ...

Thanks a lot because of your quick and complete response.
It seems that everything a developer needs is available in Chinese language tab of the website while I always checked English language tab. The English language tab contents lacks links that you mentioned.
Chinese Link: https://docs.ai-thinker.com/blue_tooth_pb
English Link:  https://docs.ai-thinker.com/en/blue_tooth_pb
Thanks again.
回复 支持 反对

使用道具 举报

WangChong | 2023-10-9 16:13:19 | 显示全部楼层
master.chipset 发表于 2023-10-9 15:26
Thanks a lot because of your quick and complete response.
It seems that everything a developer nee ...

回复 支持 反对

使用道具 举报

master.chipset | 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

################################################
回复 支持 反对

使用道具 举报

master.chipset | 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
回复 支持 反对

使用道具 举报

master.chipset | 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?
回复 支持 反对

使用道具 举报

WangChong | 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
回复 支持 反对

使用道具 举报

WangChong | 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
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则