Improvements to JAWBONE firmware#17
Open
The-Bootloader wants to merge 3 commits into
Open
Conversation
added 3 commits
July 11, 2026 23:14
…tracking - GPStimeInitAutobaud(): tries 9600 baud then 115200, alternating every 5 s, locks when a valid '$'-prefixed NMEA sentence is received - Enable UART1 hardware FIFO (was disabled) so bytes don't drop during ISR - ISR: read full DR register to detect framing errors (wrong baud indicator); guard against buffer overflow on over-long sentences - ISR: buffer debug-print sentences and flush from main loop (safe to printf) - parse_GPS_data: add GPGGA/NGGA fallback prefixes alongside GNGGA; likewise GPRMC/NRMC fallbacks for GNRMC - Parse UTC date (DD/MM/YY) from RMC field 10 into GPStimeData.day/month/year - Parse GSV sentences for all constellations (GPS/GLONASS/Galileo/BeiDou/QZSS) and maintain per-constellation and total sats-in-view counters - get_nmea_field_str() helper for safe NMEA field extraction - Switch to GPStimeInitAutobaud() in the WSPR flow
GPS soft-start power-on: - gps_power_on(): uses internal ~50kΩ pull-down for 10 ms to limit MOSFET gate inrush before fully asserting the output — mitigates brownout resets on GPS power-on that can be caused by inrush current dragging the 3.3 V rail - All three GPS turn-on sites (WSPRbeaconInit, scheduler SEQ==10, datalog) now call gps_power_on() instead of bare gpio_put Watchdog coverage: - watchdog_update() in get_user_input() so long string entry doesn't trigger reset - 5-second watchdog enabled before the main loop; watchdog_update() each iteration - Menu prompt replaced with a 1-second-chunk loop feeding the watchdog - Frequency tuning "press any key" wait feeds the watchdog Geofencing: - is_position_geofenced(): checks 4-char Maidenhead against a table of restricted grids (Yemen and North Korea for now); WSPR TX suppressed when position matches WSPRbeaconGetTxStatus(): - Returns a human-readable string describing current TX/GPS state (no-comms, GPS acquiring, waiting for slot, TX progress, next-TX countdown) - Used in the periodic telemetry StampPrintf to show lat/lon/grid/sats/TX status
… HardFault Binary GPS flash datalog (gpslog module): - New gpslog.h/gpslog.c: 32-byte packed binary records in flash sectors 66-320 (255 sectors × 128 records = 32 640 slots); metadata sector at 65 - Modes: 1=circular (evict oldest sector when full), 2=stop-when-full - gpslog_append(), gpslog_dump_csv(), gpslog_wipe(), gpslog_stats() API - Altitude stored with +1000 m offset to support negative altitudes - GPS stability check: waits up to 30 s for position to settle (<100 m delta, no rising sat count) before logging - datalog_loop() fully rewritten; GPS turned on via gps_power_on(); uses GPStimeInitAutobaud(); logs date/time from RMC, all constellation sats RTC dormant sleep: - go_to_sleep(uint32_t minutes): switches clk_sys to XOSC, sets RTC alarm, enters deep sleep (WFI with SLEEPDEEP set), then watchdog-reboots on wake - CMakeLists: add hardware_rtc link library; add gpslog.c source Menu improvements: - 'D' menu option: active data-log mode selector (0/1/2/W/D), prompts for sleep interval in minutes, stores in NVRAM at offset 31 - show_values(): shows GPS log fill stats and datalog sleep interval - NVRAM: remove obsolete _custom_PCB, _battery_mode, _band_hop; add _Datalog_sleep_minutes; offsets 13, 18, 26 marked unused (preserved for backward NVRAM compatibility) HardFault handler: - isr_hardfault (naked): saves MSP/PSP stack pointer and calls C handler - hardfault_handler_c: stores PC + LR in watchdog scratch[1]/[2], triggers 100 ms watchdog reset - On boot: checks scratch[0] == 0xDEADBEEF, saves crash_pc/crash_lr - 'Z' menu command recalls last crash address pair - Printable-only ASCII filter on startup keypress detection to suppress spurious CDC control bytes sent by terminal emulators on USB connect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
I made improvements to the JAWBONE firmware that I would like to submit for your consideration.
Several improvements:
I have done limited testing. It works well for me, but I did not test WSPR transmission although I did not change it.
I would appreciate if you could test on your end too, to verify.