Coder Social home page Coder Social logo

support for CC2451 ? about cclib HOT 11 CLOSED

wavesoft avatar wavesoft commented on August 16, 2024
support for CC2451 ?

from cclib.

Comments (11)

wavesoft avatar wavesoft commented on August 16, 2024

Hello ericcastro,

the library itself implements the CC Debugger protocol from TI, therefore it should be able to flash the whole CC253x/4x family. However there need to be some changes to the examples, since they were tailored to the BLE112/BLE113 commercial modules (that need a licence key in some particular memory address etc.)

  • The arduino proxy can stay as-is, since it's very low-level
  • The cclib python library provides all the functions you will need
  • Only the cc_write_flash.py needs to be changed in order to match your needs

In detail you will only need to comment-out the BLE functionality (getBLEInfo + the block of code for checking the license, and getBLEPStoreSize + the block of code to save the PStore).

If you want to test, modify the cc_info.py and comment-out the lines 46-50. If it displays the correct chip information you are ready to go!

If it works I can write an alternative write_flash.py script.

from cclib.

wavesoft avatar wavesoft commented on August 16, 2024

You will also need to update the chipID guard (ccdebugger.py:95-96)

        if ((self.chipID & 0xff00) != 0x8d00) && (self.chipID & 0xff00) != 0x4100)):
            raise IOError("This class works ONLY with CC2540/2541 TI chips (This is a 0x%04x)!" % self.chipID)

from cclib.

ericcastro avatar ericcastro commented on August 16, 2024

trying this now. will let you know how it goes!

from cclib.

ericcastro avatar ericcastro commented on August 16, 2024

ok, output looks much better now

Using CCDebugger on port /dev/tty.usbmodem1421

Chip information:
      Chip ID : 0x4113
   Flash size : 16 Kb
    SRAM size : 1 Kb
          USB : No

Debug status:
 [ ] CHIP_ERASE_BUSY
 [ ] PCON_IDLE
 [X] CPU_HALTED
 [ ] PM_ACTIVE
 [ ] HALT_STATUS
 [X] DEBUG_LOCKED
 [X] OSCILLATOR_STABLE
 [ ] STACK_OVERFLOW

Debug config:
 [ ] SOFT_POWER_MODE
 [ ] TIMERS_OFF
 [ ] DMA_PAUSE
 [ ] TIMER_SUSPEND

let me know if this is correct / expected, and what do we need to flash it. thanks for the help!

from cclib.

wavesoft avatar wavesoft commented on August 16, 2024

Hmm.. the device seems to respond properly, however the memory values seems a bit off. This either means that it couldn't read the CHIPINFO0 (0x6276) register (ex. different instructions between the two chips), or the register is actually zero.

Try to read the CHIPID Register (that should be 0x4113) or any other register that you know it's value in order to check if this is register issue:

chipid = dbg.readXDATA(0x624A, 1)
print "0x%04x" % chipid[0]

from cclib.

ericcastro avatar ericcastro commented on August 16, 2024

thanks, I already left home for work but will try this tonight and will let you know.

from cclib.

ericcastro avatar ericcastro commented on August 16, 2024

ok I tried this and not getting anything very interesting so far
the lines:

chipid = dbg.readXDATA(0x624A, 1)
print "0x%04x" % chipid[0]

will output:

0x0000

also, I uncommented some of the output lines you mentioned to remove just to see if there was anything there, I got:

Device information:
 IEEE Address : 000000000000
           PC : 0000

Firmware information:
      License : 0000000000000000000000000000000000000000000000000000000000000000
   BT Address : 00:00:00:00:00:00
 Hardware Ver : 00

I suspect there could be something wrong with the wiring I made ? I may have misunderstood something with the voltage dividers maybe ? Here is a picture of my breadboard so you can take a look as well if you want:
http://i.imgur.com/8yU1WNQ.jpg

and this is my pin config in CCLib proxy on my Leonardo:

int LED      = 13;
int CC_RST   = 10;
int CC_DD_I  = 8 ;
int CC_DD_O  = 7;
int CC_DC    = 9;

from cclib.

wavesoft avatar wavesoft commented on August 16, 2024

Hello @ericcastro, sorry for my late reply, but I was a bit buried with work.
I see some problems with your wiring (top right voltage divider).

You can check this diagram for reference:

Let me know if you manage to get this working in order to update the my compatibility table ;)

from cclib.

wavesoft avatar wavesoft commented on August 16, 2024

Hey @ericcastro do you have any update on this? Otherwise I will close this issue.

from cclib.

ericcastro avatar ericcastro commented on August 16, 2024

oh, I'm sorry I never did reply. Actually I was able to use a different utility (CCLoader by RedBearLabs) in order to successfully flash my CC2451 - so from my end this is no longer relevant.

Thanks - Eric

from cclib.

wavesoft avatar wavesoft commented on August 16, 2024

Thanks for the reply @ericcastro

from cclib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.