🛠 Reflasher le CC1352P7 en BSL depuis le processeur hôte
Objectives
The BeaglePlay radio module is a TI CC1352P7 supporting 802.15.4 and BLE. Its factory firmware is not always the desired one; this tutorial shows how to reflash it via BSL (BootLoader Serial) directly from the BeaglePlay's Linux, without JTAG, using the cc2538-bsl.py script and the wpanusb firmware from the build/play repository of the BeagleBoard project. We also apply the k3-am625-beagleplay-bcfserial-no-firmware.dtbo overlay so that the kernel no longer tries to load a non-existent firmware on the module's serial line.
Hardware
- A BeaglePlay board (eMMC or SD, root access)
- The internal serial line of the CC1352P7 exposed in BSL mode (forced boot via the reset line)
- The
build/playrepository (scripts cc2538-bsl.py, bcfserial, wpanusb)
Complete Code
# 1. Empêcher le noyau de charger un firmware sur la ligne du module
# dans /boot/firmware/extlinux/extlinux.conf, ajouter :
# fdtoverlays /overlays/k3-am625-beagleplay-bcfserial-no-firmware.dtbo
sudo reboot
# 2. Récupérer les outils
git clone https://github.com/beagleboard/build.play /opt/build.play
cd /opt/build.play
# 3. Passer le CC1352P7 en BSL puis flasher le firmware wpanusb
sudo python3 cc2538-bsl.py -p /dev/ttyS2 -e -w -v -a 0x0 firmware/wpanusb_cc1352p7.hex
sudo reboot
# 4. Le module devient un périphérique série interne : créer wpan0
sudo modprobe wpanusb
Expected Verification
cc2538-bsl.py displays the detected chip (CC1352P7), the erasure, writing, and verification of the .hex file without errors. After reboot and modprobe wpanusb, ip link shows a wpan0 interface; dmesg | grep -i wpan confirms the device enumeration. The kernel log no longer shows failed attempts to load bcfserial firmware.
Common Errors
- Forgetting the no-firmware overlay: the bcfserial driver requests a firmware, causing the module to loop and occupying the BSL serial line.
- Wrong serial port: the BSL line is not the Bluetooth one; identify the correct ttyS using the schematic and
dmesg. - Powering the board with a simple charger during flashing: a power cut mid-write leaves the CC1352P7 without a valid bootloader.
- Using a .hex compiled for CC1352 (without P7): the BSL checks the model and refuses.
- Leaving the bcfserial overlay active: bcfserial and wpanusb are exclusive drivers for the same hardware.
Other tutorials for this board
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash