Skip to content

Commit

Permalink
[RP2040] bump Pico Core up to 3.9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
lyusupov committed Jul 24, 2024
1 parent fda5ff6 commit 9bfb7d4
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ jobs:
fi
if [[ "$BOARD" =~ "rp2040:rp2040:" ]]; then
arduino --pref "boardsmanager.additional.urls=https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json" --save-prefs ;
arduino --install-boards rp2040:rp2040:3.9.3 ;
arduino --install-boards rp2040:rp2040:3.9.4 ;
arduino --board $BOARD --save-prefs ;
if [[ "$BOARD" =~ "rp2040:rp2040:rpipicow" ]]; then
arduino --pref "custom_freq=rpipicow_120" --save-prefs ;
Expand Down
65 changes: 64 additions & 1 deletion software/firmware/source/SkyWatch/GNSSHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ const char *GNSS_name[] = {
[GNSS_MODULE_AT65] = "AT65",
[GNSS_MODULE_MT33] = "MT33",
[GNSS_MODULE_GOKE] = "GOKE",
[GNSS_MODULE_UC65] = "UC65"
[GNSS_MODULE_UC65] = "UC65",
[GNSS_MODULE_AG33] = "AG33"
};

#if defined(ENABLE_GNSS_STATS)
Expand All @@ -86,6 +87,7 @@ const char *GNSS_name[] = {
* Neo6: GGA - 138 , RMC - 67
* MT33: GGA - 48 , RMC - 175
* UC65: GGA - TBD , RMC - TBD
* AG33: GGA - TBD , RMC - TBD
*/

gnss_stat_t gnss_stats;
Expand Down Expand Up @@ -1146,6 +1148,63 @@ const gnss_chip_ops_t uc65_ops = {
};
#endif /* EXCLUDE_GNSS_UC65 */

#if !defined(EXCLUDE_GNSS_AG33)
static gnss_id_t ag33_probe()
{
return GNSS_MODULE_NMEA; /* TBD */
}

static bool ag33_setup()
{
Serial_GNSS_Out.write("$PAIR002*38\r\n"); /* Powers on the GNSS system */
delay(250);

/* GPS + GLONASS + Galileo + BeiDou + QZSS */
Serial_GNSS_Out.write("$PAIR066,1,1,1,1,1,0*3B\r\n"); delay(250);

Serial_GNSS_Out.write("$PAIR062,0,1*3F\r\n"); /* GGA 1s */ delay(250);
Serial_GNSS_Out.write("$PAIR062,4,1*3B\r\n"); /* RMC 1s */ delay(250);
#if 0
Serial_GNSS_Out.write("$PAIR062,1,0*3F\r\n"); /* GLL OFF */ delay(250);
Serial_GNSS_Out.write("$PAIR062,3,0*3D\r\n"); /* GSV OFF */ delay(250);
Serial_GNSS_Out.write("$PAIR062,5,0*3B\r\n"); /* VTG OFF */ delay(250);
#endif
#if defined(NMEA_TCP_SERVICE)
if (settings->nmea_out == NMEA_TCP) {
Serial_GNSS_Out.write("$PAIR062,2,1*3D\r\n"); /* GSA 1s */
}
else
#endif /* NMEA_TCP_SERVICE */
{
Serial_GNSS_Out.write("$PAIR062,2,0*3C\r\n"); /* GSA OFF */
}
delay(250);

Serial_GNSS_Out.write("$PAIR080,0*2E\r\n"); /* Normal Mode */ delay(250);

return true;
}

static void ag33_loop()
{

}

static void ag33_fini()
{
Serial_GNSS_Out.write("$PAIR003*39\r\n"); /* Powers off the GNSS system */
delay(250);
}

const gnss_chip_ops_t ag33_ops = {
ag33_probe,
ag33_setup,
ag33_loop,
ag33_fini,
0 /* GGA */, 0 /* RMC */
};
#endif /* EXCLUDE_GNSS_AG33 */

static bool GNSS_fix_cache = false;

bool isValidGNSSFix()
Expand Down Expand Up @@ -1236,6 +1295,10 @@ byte GNSS_setup() {
gnss_id = gnss_id == GNSS_MODULE_NMEA ?
(gnss_chip = &uc65_ops, gnss_chip->probe()) : gnss_id;
#endif /* EXCLUDE_GNSS_UC65 */
#if !defined(EXCLUDE_GNSS_AG33)
gnss_id = gnss_id == GNSS_MODULE_NMEA ?
(gnss_chip = &ag33_ops, gnss_chip->probe()) : gnss_id;
#endif /* EXCLUDE_GNSS_AG33 */

gnss_chip = gnss_id == GNSS_MODULE_NMEA ? &generic_nmea_ops : gnss_chip;

Expand Down
1 change: 1 addition & 0 deletions software/firmware/source/SkyWatch/Platform_ESP32.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ extern PCF8563_Class *rtc;
#define EXCLUDE_GNSS_AT65
#define EXCLUDE_GNSS_SONY
#define EXCLUDE_GNSS_UC65
#define EXCLUDE_GNSS_AG33
#define EXCLUDE_LOG_GNSS_VERSION
#endif /* CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 */

Expand Down
1 change: 1 addition & 0 deletions software/firmware/source/SkyWatch/SkyWatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ enum
SOFTRF_MODEL_MIDI,
SOFTRF_MODEL_ECO,
SOFTRF_MODEL_INK,
SOFTRF_MODEL_CARD,
SOFTRF_MODEL_NEO,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define SOC_GPIO_PIN_GNSS_T1000_RX _PINNUM(0, 14) // P0.14
#define SOC_GPIO_PIN_GNSS_T1000_TX _PINNUM(0, 13) // P0.13

#define SOC_GPIO_PIN_GNSS_T1000_PPS SOC_UNUSED_PIN // TBD
#define SOC_GPIO_PIN_GNSS_T1000_PPS SOC_UNUSED_PIN
#define SOC_GPIO_PIN_GNSS_T1000_IRQ _PINNUM(1, 12) // P1.12
#define SOC_GPIO_PIN_GNSS_T1000_RST _PINNUM(1, 15) // P1.15
#define SOC_GPIO_PIN_GNSS_T1000_EN _PINNUM(1, 11) // P1.11
Expand All @@ -23,8 +23,8 @@
#define SOC_GPIO_PIN_T1000_BUSY _PINNUM(0, 7) // P0.07

/* I2C */
#define SOC_GPIO_PIN_T1000_SDA _PINNUM(0, 9) // P0.26 ?
#define SOC_GPIO_PIN_T1000_SCL _PINNUM(0, 10) // P0.27 ?
#define SOC_GPIO_PIN_T1000_SDA _PINNUM(0, 26) // P0.26
#define SOC_GPIO_PIN_T1000_SCL _PINNUM(0, 27) // P0.27

/* button */
#define SOC_GPIO_PIN_T1000_BUTTON _PINNUM(0, 6) // P0.06
Expand Down
2 changes: 1 addition & 1 deletion software/firmware/source/SoftRF/src/platform/nRF52.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ struct rst_info {
#define BME280_ADDRESS (0x77)
#define MPU9250_ADDRESS (0x68)
#define ICM20948_ADDRESS (0x68)
#define QMA6100P_ADDRESS (0x12) // 0x13 when AD0 = HIGH
#define QMA6100P_ADDRESS (0x12)

#if defined(ARDUINO_ARCH_MBED)
#define PCF8563_SLAVE_ADDRESS (0x51)
Expand Down

0 comments on commit 9bfb7d4

Please sign in to comment.