Skip to content

Fix Cap LoRa 1262 invalid initialization#17

Open
MultiMote wants to merge 1 commit into
Stachugit:masterfrom
MultiMote:master
Open

Fix Cap LoRa 1262 invalid initialization#17
MultiMote wants to merge 1 commit into
Stachugit:masterfrom
MultiMote:master

Conversation

@MultiMote

Copy link
Copy Markdown

Hello. Current version does not initialize LoRa Cap correctly. +3.3v not is not present on "SW" pin (io expander P0) of "Stamp LoRa-1262 Mini".

1.

    // Step 1: Enable power to I/O expander on LoRa Cap (GPIO 46)
    pinMode(46, OUTPUT);
    digitalWrite(46, HIGH);
    delay(100);  // Give I/O expander time to power up

GPIO46 not goes to IO expander, it goes to output of audio codec

vivaldi_o4uEAZUMCU

2.

M5.In_I2C.writeRegister8(0x43, 0x03, 0x00, 100000);  
delay(10);
M5.In_I2C.writeRegister8(0x43, 0x01, 0xFF, 100000);  

Both commands are invalid.

0x03 - Set direction. "Output" for P0 is 0x01.
0x01 - Is "ID" register. It should not be written with 0xFF.

Correct sequence is

M5.In_I2C.writeRegister8(0x43, 0x03, 0x01, 100000); // P0 Direction output
M5.In_I2C.writeRegister8(0x43, 0x07, 0x00, 100000); // P0 Disable high-impedance so pin can actually drive
M5.In_I2C.writeRegister8(0x43, 0x05, 0x01, 100000); // P0 High Level

Or you just can use M5's PI4IOE5V6408_Class.

https://docs.m5stack.com/en/arduino/projects/cap/cap_lora868#31-lora-usage-example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant