Electrical – programming a BEKEN BK3431 bluetooth 4.0 ble tag chip

bluetoothbluetooth low energy

I have few BLE tags, with button+led+buzzer (AKA "iTag"),
I opened them up and saw it's based on one chip: BEKEN BK3431.
I have access to the following JTAG/test pads:

VCC3V |
GND |
P05 |
P04 |
P06 |
P07 |
PROG |
RSTN |
TXD |
RXD

I searched online and could not find an references for programming it.
I want to build a simple costume firmware (in c/c++), and make the tag broadcast custom data.
What development tools/hardware and software do i need to upload my own firmware on this BK3431 tag? Is anyone familiar with this chip?
Thanks

Best Answer

Looks like a neat little IC, already packaged. I'm interested in doing the same, but where is this "relevant file" referred to below?

It is SPI not JTAG, as it does not have the "JTAG_MODE" (pin 24) or "JTAG_RST" (P03, pin 1) pins broken out.

From the datasheet:

"128K bytes FLASH memory is used for storing program code. It can be accessed through a simple SPI interface. Four GPIO P0.4, P0.5, P0.6 and P0.7 are used for program FLASH in program mode. You can read, write or erase the FLASH space with different SPI command. For detail information, please refer to the relevant file. After erase, all the data in the FLASH are 0xFF, customer can write their program into the FLASH. Also, the data in the FLASH can be read out for debug. Once the developing process is done, the access for the FLASH can be forbbided by writing 0x12345678 into the last four addresses. ([128k-4]~[128k])"

, so maybe it has been "forbidded"?

FLASH programming: JTAG, I2C, SPI and UART interface.

It looks like P04, 5, 6 & 7 are connected to the SPI (4-MOSI, 5-MISO, 6-SCK & 7-CSI (CE)), while the UART interface is also broken out. PROG sets "Flash Program Mode selection; 0: Flash in normal mode & 1: Flash in program mode"???

I think this a dead end, but it was fun trying...