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

spi pin mapping mbed

I am trying to write my firmware in mbed instead of microvision. I have my own custom PCB w/ the nRF51822 and use SPI with different GPIO pins than the standard ones.

My firmware runs fine on the dev kit when I use SPI(p25, p28, p29) which are the recommended pins but when I try using SPI(p0, p2, p3) as I have wired in my PCB it doesn't work. I checked out the source code and it looks like it should work w/ any pin mapping.. ->

mbed/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/spi_api.c

Whats up with this and how can i fix it?

Thanks, Mike

Parents
  • After I updated mbed I started getting a compile error for all my programs that used to work.

    Error: #error directive: "Device family must be defined. See nrf.h." in "mbed-src/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/nrf.h", Line: 40, Col: 6

    Other people have been getting this too.

    developer.mbed.org/.../

    Im not sure whats up.

    Edit:

    To fix the nrf51 platform compile error in mbed i reverted to older revisions of the nrf51822, BLE_API and mbed-src libraries.

    To flexibly map pins I edited the PinNames.h and device.h files in TARGET_NRF51_DK and made sure there were no collisions between pins I was using and other modules like UART.

    -Mike

Reply
  • After I updated mbed I started getting a compile error for all my programs that used to work.

    Error: #error directive: "Device family must be defined. See nrf.h." in "mbed-src/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/nrf.h", Line: 40, Col: 6

    Other people have been getting this too.

    developer.mbed.org/.../

    Im not sure whats up.

    Edit:

    To fix the nrf51 platform compile error in mbed i reverted to older revisions of the nrf51822, BLE_API and mbed-src libraries.

    To flexibly map pins I edited the PinNames.h and device.h files in TARGET_NRF51_DK and made sure there were no collisions between pins I was using and other modules like UART.

    -Mike

Children
No Data
Related