This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

cc2538: API needed for connecting to CC3100 through SPI

Part Number: CC2538
Other Parts Discussed in Thread: CC2538, CC3100

As I understand, to use CC3100 SDK I should only: - Include the "simplelink" folder - Implement my SPI interface functions (read, write, open, close) - Edit user.h But in the example platforms, more functions are needed in user.h that are implemented in "board.c". To connect CC3100 to CC2538, should I implement the functions in "board.c" file myself or they are system functions that are just included from CC2538 libraries?

  • Hi,

    I am not sure I fully understand your question but I will try to answer. You should not need to implement any functions yourself in this case, both the CC3100 and CC2538 have an SPI driver available. Are you using the CC2538 foundation firmware? There should be an SPI master example in there.
  • Ok, I found the interrupts API for CC2538 that can help me with this interface. There are three more functions needed:

    1 - A function to stop the Watch Dog timer. I found only WatchDogEnable() and WatchDogClear(), non of them stops the timer.
    2 - A function to initialize the system clock of MCU
    3 - A function to produce a delay for some time in milliseconds

    Where I can find these functions for CC2538?
  • 1. This is how the watchdog is designed. The assumption is if you need to use the watchdog in your application, you turn it on permanently.
    2. Refer to any of the sample applications main() functions (i.e. look in spi_master.c), there should be an API call to SysCtrlClockSet() and other configuration APIs near the beginning of each.
    3. You can refer to the GPTimer examples in the foundation firmware, there should be an example for both a oneshot timer and a periodic timer.