Quantcast
Channel: SparkFun Electronics Forum
Viewing all articles
Browse latest Browse all 82

SparkFun Products Using The Artemis • Apollo3-Explorable SPI pins swap

$
0
0
Hi,
I wondering if is possible to swap the SPI pins (SDI/MISO, SDO/MOSI) of the Thing Plus Eplorable with Apollo3, in the Arduino code.
By default they are routed like this:
SDI/MISO = 25
SDO/MOSI = 28

With the Apollo3 example Example06_SPI is possible to change the pin definitions. Adapted in my code, it compiles and download, but then get error.

here a snip of the code
Code: 
#include "SPI.h"#define SPI_MODE SPI_MODE3//MbedSPI mySPI(mySDI, mySDO, myCLK);MbedSPI spiPort(28, 25, 27);..  spiPort.begin();  // Do a fake transaction to initialize the SPI pins   spiPort.beginTransaction(SPISettings(4000000, MSBFIRST, SPI_MODE3));  spiPort.transfer(0);  spiPort.endTransaction();..

but then I get this error
++ MbedOS Error Info ++
Error Status: 0x80FF0144 Code: 324 Module: 255
Error Message: Assertion failed: (int)iom != IOM_NUM
Location: 0x33339
File: mbed-os/targets/TARGET_Ambiq_Micro/TARGET_Apollo3/device/spi_api.c+86
Error Value: 0x0
Current Thread: main Id: 0x10005550 Entry: 0x34349 StackSize: 0x1000 StackMem: 0x100071C0 SP: 0x10007F34
For more info, visit: https://mbed.com/s/error?error=0x80FF01 ... expLoRaBLE
-- MbedOS Error Info --
any idea where the propblem is?
Tnx

Statistics: Posted by sgrunc_80 — Thu Jun 13, 2024 12:34 am



Viewing all articles
Browse latest Browse all 82

Trending Articles