mitxela.com forum
Welcome. Please log in or register.

« PreviousPages: 1 2 3 4 [5]

Beken BK3231
mr_woggle Posted: 26 Feb 2024, 12:45 PM
Avatar


Member
Posts: 8
Joined: 17-February 24
Great work nonetheless :D I'll try to free up some time to look at it.

I kinda busted the TESTEN on my board, so I'm using the trace to set the signal high. I also realized I dumped the firmware wrong. Quickly wrote my own, will try use the Jlink SPI flash tool next time.

Haven't studies the firmware dump that much, but I saw that @0x80000, a similar configuration(?) is: block starts with
48 14 1A 08  15 18 0C 12


Besides the flash and config, I also saw some other non 0xFF values at 0xFE800 amongst others. Could be garbage though.

Last edit by mr_woggle at 26 Feb 2024, 12:52 PM

-------------
[top]
PookyFan Posted: 26 Feb 2024, 06:24 PM
Avatar


Member
Posts: 8
Joined: 11-February 24
QUOTE (mr_woggle)
Haven't studies the firmware dump that much, but I saw that @0x80000, a similar configuration(?) is: block starts with
But 0x80000 is just beyond the flash capacity (which is 512 kB). How do you read your chip's flash? It looks like your method may be erroneous.

-------------
[top]
mr_woggle Posted: 26 Feb 2024, 07:21 PM
Avatar


Member
Posts: 8
Joined: 17-February 24
Could was def. be some error on my side. Was reading out in 0x800 0x400 byte blocks. This one showed at block 0x100. Edit: read again, config data indeed 0x40000. Some other very small blobs of weird data found of ~32 bytes

Datasheet does say these chips go up to 4M-bytes. Got some weird bluetooth tag and not the more commonly seen JDY-31.






Last edit by mr_woggle at 26 Feb 2024, 08:09 PM

-------------
[top]
PookyFan Posted: 26 Feb 2024, 07:50 PM
Avatar


Member
Posts: 8
Joined: 11-February 24
QUOTE (mr_woggle)
Datasheet does say these chips go up to 4M-bytes. Got some weird bluetooth tag and not the more commonly seen JDY-31.

I see, but it didn't look like you had any kind of external flash memory on this tag, so I just assumed this is the same variant that I have on JDY-31, with built-in flash memory (described as "QFN32 package(SIP with flash)" on page 14 of BK3231S datasheet). But if your device actually has external flash (on the other side of the PCB maybe), then it would be any other flash chip with different size, that for sure.
So the question is, which variant of BK3231S do you have and what kind of flash memory does it have? I prepared that SDK with JDY-31 in mind so it may be that you'd need to change this and that to make an use of it.

Last edit by PookyFan at 26 Feb 2024, 07:50 PM

-------------
[top]
PookyFan Posted: 2 Mar 2024, 02:58 PM
Avatar


Member
Posts: 8
Joined: 11-February 24
I'm still stuck with Bluetooth issues. Can't really figure out why it doesn't work, and have no idea how to troubleshoot it. For starters, there are way too many reasons as for why it might not work. It may be that I accidentally deleted some code that is required to work (a few functions had multiple implementations, some of which would not compile, maybe there were some headers missing for registers descriptions). It may be that the code built from source is in some way binary incompatible with pre-compiled library (although linker had no issues with linking it). It may be that something blows up upon MCU booting up and it screws BT stack later on (it looks like the module restarts once after it enters main loop, maybe something bad happens right then). Just too many things could have gone wrong and it's really hard to even start troubleshooting it, as the code base is really horrible.

Also after looking more into that pre-compiled library that's linked statically to the project, it turns out to be not only some kind of BT stack, but also binary blob that controls proprietary Bluetooth IP by CEVA. This BlueStream project described in header files from "include/Core" might have been provided to Beken from CEVA without source code or even internal registers description. If that's the case, then replacing it with open source alternatives might not be possible at all, if it doesn't just depend on MCU internal registers (that would be reverse engineered to some degree from SDK source code), but also on Bluetooth IP's internal registers that would be not known even to MCU manufacturer.

So I guess that makes figuring out what's wrong with BT in my firmware image even harder. It's frustrating after all the work I put into building new fw and troubleshooting it, but if some enlightenment doesn't soon occur to me (or anyone to whom it may concern), it may be better to drop modules with this chip altogether, or accept them as blackbox tools with no way to extend their functionality.

-------------
[top]
mr_woggle Posted: 3 Mar 2024, 10:08 AM
Avatar


Member
Posts: 8
Joined: 17-February 24
Good to put it out there anyway, some new code/datasheet might pop up some day.

This really is some ancient stuff. I think some of the code goes back 20+ years. Looking at the code comments, the radio hardware might be very similar to this: https://www.hitachi.co.jp/New/cnews/2002/0624/index.html

-------------
[top]

« PreviousPages: 1 2 3 4 [5]

Sign in to post a reply.