This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF8001 acilib for 16 bit microprocessor

Is there a port of lib_aci for 16-bit processors? The structs in lib_aci written for nRF8200 are byte misaligned using a 16-bit processor. Seems to be almost a complete rewrite to fix this for the 16-bit processor I am using. Any suggestions appreciated.

Thanks

Parents
  • Hi,

    There is a minimal port of the lib aci driver of the nRF8001 to the msp430 (16 bit cpu), but this port also depends on the fact that code composer 5.2 or later allows the attribute ((packed)) . This allows the ACI library ported from the Arduino SDK for BLE to be used with minimal changes.

    If your processor does not support byte alignment then you can use the acilib functions which allow you to read the SPI message and put the ACI messages into the relevant structures. See the decode and encode functions in acilib.h and acilib.cpp, this should allow you to port the ACI library to any 16bit CPU.

    I have attached the msp430 port of the ACI library (using attribute ((packed)) ). This is used with the msp430 launchpad (G2553 with 512bytes of RAM).

    MSP430_Launchpad_nRF8001.zip

Reply
  • Hi,

    There is a minimal port of the lib aci driver of the nRF8001 to the msp430 (16 bit cpu), but this port also depends on the fact that code composer 5.2 or later allows the attribute ((packed)) . This allows the ACI library ported from the Arduino SDK for BLE to be used with minimal changes.

    If your processor does not support byte alignment then you can use the acilib functions which allow you to read the SPI message and put the ACI messages into the relevant structures. See the decode and encode functions in acilib.h and acilib.cpp, this should allow you to port the ACI library to any 16bit CPU.

    I have attached the msp430 port of the ACI library (using attribute ((packed)) ). This is used with the msp430 launchpad (G2553 with 512bytes of RAM).

    MSP430_Launchpad_nRF8001.zip

Children
No Data
Related