I have only just started using platformio with esp32. I have 2 main issues, if up upload code from platformio and then go back to using arduino ide the esp32 is bricked and goes into a constant crash and reboot cycle.
Rebooting...
assertion "false && "item should have been present in cache"" failed: file "/Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/nvs_flash/src/nvs_item_hash_list.cpp", line 85, function: void nvs::HashList::erase(size_t)
abort() was called at PC 0x400d3cc7 on core 0
The second issue, is that I cannot get the SI5351 module to work with platformio. it knows the module is there in an i2c scan but the module does not output anything.
Code that works in aurduino ide compiles fine but there is no output from the module.
#include "si5351.h"
#include "Wire.h"
#define PLLB_FREQ 87600000000ULL
Si5351 si5351(0x60); //correct address
void setup()
{
// Start serial and initialize the Si5351
Serial.begin(57600);
Wire1.begin(21,22,400000); // correct pin assignments
si5351.init(SI5351_CRYSTAL_LOAD_8PF, 0, 0);
// Set VCXO osc to 876 MHz (146 MHz x 6), 40 ppm pull
si5351.set_vcxo(PLLB_FREQ, 40);
// Set CLK0 to be locked to VCXO
si5351.set_ms_source(SI5351_CLK0, SI5351_PLLB);
// Tune to 146 MHz center frequency
si5351.set_freq_manual(14600000000ULL, PLLB_FREQ, SI5351_CLK0);
si5351.update_status();
delay(500);
}
void loop()
{
// Read the Status Register and print it every 10 seconds
si5351.update_status();
Serial.print("corr: ");
// Serial.print(si5351.get_correction());
Serial.print(" SYS_INIT: ");
Serial.print(si5351.dev_status.SYS_INIT);
Serial.print(" LOL_A: ");
Serial.print(si5351.dev_status.LOL_A);
Serial.print(" LOL_B: ");
Serial.print(si5351.dev_status.LOL_B);
Serial.print(" LOS: ");
Serial.print(si5351.dev_status.LOS);
Serial.print(" REVID: ");
Serial.println(si5351.dev_status.REVID);
delay(10000);
}
Google has yeilded no answers, does anyone here have any idea whats going on? Code works in arduino but not platformio, once a micro has been used in platformio it wont run code from arduino anymore.
Im lost.