Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 6

EdHa_4455331
Level 5
25 replies posted 25 sign-ins 10 replies posted
Level 5

I'm still working on trying to get my DFU working on a CYBLE-416045-02 module. The system seems to work with CySmart all the way up to when the newly downloaded program is supposed to start. I have traced it through the boot loader to where it is supposed to start APP1, but then the program goes to la-la land, never to return.

The attached code is a stripped down version of my real code (which is much much larger). But it still has the ram and rom allocations in the dfu_cm*.ld files that my real program uses. I suspect that I have something slightly wrong in those files, but as best I can tell they seem to be correct for my code which needs much more room than the default ram and rom allocations.

I have been trying to get this to work off and on for several months now without success and I am now starting to get desperate. If anybody can spot the error that is killing me I will be greatly in his/her debt.

 

Ed H.

0 Likes
1 Solution
ShipingW_81
Moderator
Moderator 500 replies posted 250 solutions authored 250 replies posted
Moderator

Actually, the issue cause could not be found out just from the project files/ld files, without integrated HW debugging.

My suggestion is just run the basic DFU demo, attached in last reply, on your platform, to check if it's working. This may require some additional logic code. If yes, then you can add the code,or change the ld files according to your application requirements to the project.

View solution in original post

0 Likes
7 Replies
ShipingW_81
Moderator
Moderator 500 replies posted 250 solutions authored 250 replies posted
Moderator

The app1 has building error on my side. Have you ever tried the official BLE dfu demo for CYBLE-416045-02? Is it successful?

0 Likes
EdHa_4455331
Level 5
25 replies posted 25 sign-ins 10 replies posted
Level 5

I have never been able to find DFU demo for the CYBLE-416045-02 , only the ones for the development kit that uses the same MCU. Can you please provide a link to the 41605-02 DFU demo.

I only get one warning when I build the project, but no errors. I thought I had zipped up the complete project. What build erro are you getting?

Thanks,

Ed H.

0 Likes
ShipingW_81
Moderator
Moderator 500 replies posted 250 solutions authored 250 replies posted
Moderator

You can simply change the demo project device to CYBLE-416045-02 through device selector, and then change some specific settings accordingly - https://www.cypress.com/documentation/code-examples/ce216767-psoc-6-mcu-bluetooth-low-energy-ble-dev...

 

Please note use the PDL3.1.0 for this project. I not sure if it's compatible with latest PDL3.1.4.

0 Likes
EdHa_4455331
Level 5
25 replies posted 25 sign-ins 10 replies posted
Level 5

I am afraid it is not that simple.  ce216767 is written explicitly for the corresponding development board and uses LEDs and switches I don't have.  

So I have done the next best thing I could. The code I posted is directly based on ce21676. I used it as the starting point and then modified it to only use the hardware I have available. 

And indeed, when my code is running, CySmart goes through its entire sequence to do a DFU. And EVERYTHING works up until the very very last step when App0 switches control to APP1.

As an aside, it would be useful if Cypress would publish a bare bones DFU bootloader that did nothing but check for a valid app and if there wasn't one, stay in the bootloader. No switches, no LEDs, nothing specific to a hardware platform.

0 Likes
ShipingW_81
Moderator
Moderator 500 replies posted 250 solutions authored 250 replies posted
Moderator

I have successfully modified the demo project CE216767 to fit to CYBLE-416045-02. The DFU process has no problem. App0 can pass control to App1 smoothly and the BLE device "BLE Keyboard" could be scanned through Cysmart. Please see attached projects.

0 Likes
EdHa_4455331
Level 5
25 replies posted 25 sign-ins 10 replies posted
Level 5

Thank you, but this really doesn't help at all. The code you provided is basically targeted to an evaluation board that has LEDs and switches that are not available on my board.

I have not doubt that DFU works with a CYBLE-416045-02. But I have done what has to be done for a real-world application: I used CE216767 as a starting pattern and then modified it to use the hardware I have available on my real-world hardware platform and modified the *.ld files to match the ram/rom allocations needed for my real-world application (which are much larger than the the relatively small areas allocated in CE216767).

And somewhere along the way I must be bungling the pattern adaptation.  And THAT'S what I need help finding.

Ed H.

0 Likes
ShipingW_81
Moderator
Moderator 500 replies posted 250 solutions authored 250 replies posted
Moderator

Actually, the issue cause could not be found out just from the project files/ld files, without integrated HW debugging.

My suggestion is just run the basic DFU demo, attached in last reply, on your platform, to check if it's working. This may require some additional logic code. If yes, then you can add the code,or change the ld files according to your application requirements to the project.

0 Likes