Issue transmitting more than once using smol ARGOS ARTIC R2 Board

Hello,

I am trying to run Example2_TransmitARGOS3WithPredictionAndSleep from the ARGOS ARTIC R2 Arduino Library for the smol Arctic R2. I currently cannot have more than one transmit be successful without having to power down the entire smol stack. When it tries to power the ARTIC R2 back on for the second transmit attempt (case: power_on_ARTIC), it says it cannot detect the ARTIC. The entire stack is then powered down and the loop restarts. My smol stack is set up according to the instructions, so I was wondering if there is anything else I might be doing wrong?

Below are the debug messages for the 1st and 2nd power on of the ARTIC R2:

First power on (successful):

Starting the ARTIC R2…

begin: ARTIC is starting…

attenuateTXgain: attenuation enabled. Transmitting at reduced gain

attenuateTXgain: attenuation disabled. Transmitting at full power

begin: IO pins are configured. ARTIC has been reset.

begin: ARTIC R2 Firmware Status (before clearInterrupts):

The firmware status IDLE flag is set. The firmware is idle and ready to accept commands.

The firmware status IDLE_STATE flag is set. The firmware has returned to the idle state.

The firmware status RX_CALIBRATION_FINISHED flag is set. The RX offset calibration has completed.

The firmware status DSP2MCU_INT1 flag is set. Interrupt pin 1 is high.

clearInterrupts: clear INT1: commandResult is: MCU command result: valid. A valid housekeeping command was attempted.

clearInterrupts: clear INT2: commandResult is: MCU command result: valid. A valid housekeeping command was attempted.

begin: ARTIC R2 Firmware Status (after clearInterrupts):

The firmware status IDLE flag is set. The firmware is idle and ready to accept commands.

readTCXOControlVoltage: AUTO_DISABLE: 1 SELECT_1V3_TO_2V7: 0 SELECT_1V8: 1 SELECT_3V3: 0

clearInterrupts: clear INT1: commandResult is: MCU command result: valid. A valid housekeeping command was attempted.

MCU command result: success. The configuration command has been accepted.

TX configuration: ARGOS PTT-A3.

RX configuration: ARGOS 3.

setARGOSTxFrequency: setting XMEM location 0x1353 to 0x3282C4

getARGOSTxFrequency: XMEM location 0x1353 contains 0x3282C4 which equals 401.630 MHz

The ARGOS 2/3 TX Frequency is 401.630 MHz.

attenuateTXgain: attenuation enabled. Transmitting at reduced gain

TX gain attenuated

setPayloadARGOS3LatLon: left-justified payload is 0x000060302272430000000000000000

Second power on (unsuccessful):

Starting the ARTIC R2…

begin: ARTIC is starting…

attenuateTXgain: attenuation enabled. Transmitting at reduced gain

attenuateTXgain: attenuation disabled. Transmitting at full power

begin: IO pins are configured. ARTIC has been reset.

begin: ARTIC R2 Firmware Status (before clearInterrupts):

clearInterrupts: clear INT1: commandResult is: MCU command result: valid. A valid housekeeping command was attempted.

clearInterrupts: clear INT2: commandResult is: MCU command result: valid. A valid housekeeping command was attempted.

begin: ARTIC R2 Firmware Status (after clearInterrupts):

readPlatformID: Platform ID: 0x0

readTCXOControlVoltage: AUTO_DISABLE: 0 SELECT_1V3_TO_2V7: 0 SELECT_1V8: 0 SELECT_3V3: 0

setTCXOControl: failed! voltage: 1.80 new_voltage: 1.30 autoDisable: 1 new_disable: 0

sendConfigurationCommand: ARTIC is not idle.

clearInterrupts: clear INT1: commandResult is: MCU command result: valid. A valid housekeeping command was attempted.

clearInterrupts: clear INT2: commandResult is: MCU command result: valid. A valid housekeeping command was attempted.

MCU command result: UNCERTAIN! (MCU did not raise ACCEPTED, REJECTED or OVERFLOW)

setARGOSTxFrequency: setting XMEM location 0x1353 to 0x3282C4

attenuateTXgain: attenuation enabled. Transmitting at reduced gain

TX gain attenuated

setPayloadARGOS3LatLon: left-justified payload is 0x000060300000000000000000000000

setTxPayload: failed! Expected payload length is 96. Value read back from MEM_LOC_TX_PAYLOAD is 0.

ARTIC R2 not detected. Please check the smôl stack-up and flexible circuits.

Power-down for 6 seconds…

rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)

configsip: 0, SPIWP:0xee

clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00

mode:DIO, clock div:1

load:0x3fff0030,len:1184

load:0x40078000,len:13160

load:0x40080400,len:3036

entry 0x400805e4

SparkFun smôl ARTIC R2 Example

Starting communication with the power board…

Sounds like the system is hanging. Can it be a power shortage issue? Is your power supply giving sufficient voltage and current to your whole setup?

I am currently using the USB-C port on the ESP32 and there do not seem to be any issues with the power (I can run all other examples without issue). When trying to fix this problem, I commented out the pinMode declarations for the esp32COPI and esp32SCLK pins in the wait_for_next_pass and power_on_ARTIC cases and the code now runs successfully, so it seems these pins are not being correctly set as inputs and outputs when needed. Any idea why the pinMode declarations are not working correctly?

Hello Lindsay,

Apologies for the slow reply.

Unfortunately you posted your issue in a forum that I look at only occasionally. If you had posted in the SparkX forum, you would have had a much quicker response! Sorry about that… Next time, please use:

viewforum.php?f=123

I’m glad that the example is working for you now. You did a great job, narrowing it down to the COPI and SCLK pin modes. Excellent detective work!

Something must have changed or is different from when I wrote and tested that example. I wonder if it is the ESP32 board definitions? Can you tell me if you are using the Espressif “ESP32 Arduino” board definitions (v2.0.4 is the latest), or the older “SparkFun ESP32 Arduino” board definitions (v1.0.1)?

Very best wishes,

Paul

Thanks for the response Paul! Sorry about posting in the wrong forum.

I tried using both board definitions and neither one worked for me. I then uninstalled Arduino and reinstalled all required libraries and it now works for the SparkFun board definition! I must have messed up one of the installations for the ESP32 board when I had to manually install it on my computer.

Hi Lindsay,

Thanks for the update - that’s helpful.

I was able to replicate your issue. I don’t see the issue when I’m using the SparkFun ESP32 Arduino board package and “Thing” definition, but I do see it when using the latest Espressif ESP32 board package (again with the “Thing” definition).

Something must have changed in the way the pins are configured within the SPI library. The solution is to add an SPI.end(); just before setting those two SPI pins to inputs. When I do that, the example runs as normal. I’ve updated the example in v1.1.2 of the library - released just now.

I was also seeing some extra warnings-as-errors with v2.0.4 so I’ve fixed those too. (Espressif have changed the default compiler settings and unused variables are now errors. Previously they were just warnings.)

Release notes are here:

https://github.com/sparkfun/SparkFun_AR … tag/v1.1.2

Thanks again for reporting - we really appreciate it,

Paul