Skip to content

Conversation

misterinterrupt
Copy link
Collaborator

@misterinterrupt misterinterrupt commented May 23, 2025

This reverts the revert commit 0771d10.
Main dies at an exception with this log:
...
01:11:56.020: SD card initialized successfully.
01:11:56.020: set up sdcard
01:11:56.020: set up volume

<hard exception here and I couldn't get anything out of the stack where it was, like it jumped away>

This reverts commit 0771d10.
@misterinterrupt
Copy link
Collaborator Author

when I remove the rprintln! from the volume instantiation match arm, the log continues.. here is the log after I make that edit:

01:11:56.020: SD card initialized successfully.
01:11:56.020: set up sdcard
01:11:56.020: set up volume
01:11:56.476: Volume 0 Success:
01:11:56.476: Volume 0 Success: Volume(SearchId(5000))
01:11:56.476: set up root dir
01:11:56.476: Root Dir: Directory(SearchId(5001))
01:11:56.476: Clocks { hclk: Rate { raw: 48000000 }, pclk1: Rate { raw: 24000000 }, pclk2: Rate { raw: 48000000 }, ppre1: 2, ppre2: 1, sysclk: Rate { raw: 48000000 }, adcclk: Rate { raw: 12000000 }, usbclk_valid: true }
01:11:56.476: Clocks { hclk: Rate { raw: 48000000 }, pclk1: Rate { raw: 24000000 }, pclk2: Rate { raw: 48000000 }, ppre1: 2, ppre2: 1, sysclk: Rate { raw: 48000000 }, adcclk: Rate { raw: 12000000 }, usbclk_valid: true }
01:11:56.476: done with setup
01:11:56.476: starting board
01:11:56.476: file: Ok("0525327.csv")
01:11:56.476: Filename: "0525327.csv"
01:11:56.674: File: File(SearchId(5002))
01:11:56.674: retrieving settings
01:11:56.769: retrieved [110, 97, 109, 101, 101, 101, 101, 101, 110, 97, 109, 101, 101, 101, 101, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, 97, 109, 101, 101, 101, 101, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0, 1, 105]
01:11:56.769: retrieved settings DataloggerSettings { deployment_identifier: [110, 97, 109, 101, 101, 101, 101, 101, 110, 97, 109, 101, 101, 101, 101, 101], logger_name: [110, 97, 109, 101, 101, 101, 101, 101], site_name: [115, 105, 116, 101, 0, 0, 0, 0], deployment_timestamp: 0, interval: 60, start_up_delay: 0, delay_between_bursts: 0, burst_repetitions: 1, mode: 105, reserved: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }
01:11:56.769: attempting to store settings for test purposes
01:11:57.092: done with EEPROM writes
01:11:57.092: stored [110, 97, 109, 101, 101, 101, 101, 101, 110, 97, 109, 101, 101, 101, 101, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, 97, 109, 101, 101, 101, 101, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0, 1, 105]
01:11:57.473: done loading sensors
01:11:57.670: Success: 50
01:11:57.811: Filename: "0525327.csv"
01:11:57.811: File: File(SearchId(5003))
01:11:57.948: Success: 48
01:11:58.026: Filename: "0525327.csv"
01:11:58.105: File: File(SearchId(5004))
01:11:58.105: done with setup
01:11:58.105: Acknowledge
01:11:58.105: Acknowledge
01:11:58.105: Acknowledge
01:11:58.105: Acknowledge
01:11:58.105: Acknowledge
01:11:58.105: Acknowledge
01:11:58.105: Error
01:11:58.105: 0
01:11:58.105: Error
01:11:58.115: 0
01:11:58.115: Error
01:11:58.115: 0
01:11:58.115: Error
01:11:58.115: 0
01:11:58.115: Error
01:11:58.115: 0
01:11:58.115: Error
01:11:58.115: 0
01:11:58.258: Success: 44
01:11:58.399: Filename: "0525327.csv"
01:11:58.399: File: File(SearchId(5005))
01:11:58.399: Error
01:11:58.399: 0
01:11:58.399: Error
01:11:58.399: 0
01:11:58.399: Error
01:11:58.399: 0
01:11:58.399: Error
01:11:58.473: Success: 49
01:11:58.614: Filename: "0525327.csv"
01:11:58.614: File: File(SearchId(5006))
01:11:58.614: 0
01:11:58.614: Error
01:11:58.614: 0
01:11:58.614: Error
01:11:58.614: 0
01:12:00.543: Acknowledge
01:12:00.543: Acknowledge
01:12:00.543: Acknowledge
01:12:00.543: Acknowledge
01:12:00.552: Acknowledge
01:12:00.552: Acknowledge
01:12:00.622: Error
01:12:00.622: 0
01:12:00.622: Error
01:12:00.622: 0
01:12:00.622: Error
01:12:00.622: 0
01:12:00.622: Error
01:12:00.622: 0
01:12:00.622: Error
01:12:00.622: 0
01:12:00.622: Error
01:12:00.622: 0
01:12:00.622: Error
01:12:00.697: Success: 49
01:12:00.838: Filename: "0525327.csv"
01:12:00.838: File: File(SearchId(5007))
01:12:00.838: 0
01:12:00.838: Error
01:12:00.838: 0
01:12:00.838: Error
01:12:00.838: 0
01:12:00.838: Error
01:12:00.838: 0
01:12:00.975: Success: 45
01:12:01.112: Filename: "0525327.csv"
01:12:01.112: File: File(SearchId(5008))
01:12:01.112: Error
01:12:01.112: 0
01:12:01.112: Error
01:12:01.112: 0
01:12:02.560: Acknowledge
01:12:02.560: Acknowledge
01:12:02.560: Acknowledge
01:12:02.560: Acknowledge
01:12:02.560: Acknowledge
01:12:02.560: Acknowledge
01:12:02.637: Error
01:12:02.637: 0

@misterinterrupt
Copy link
Collaborator Author

misterinterrupt commented May 23, 2025

the root_dir is a value borrowed from the VolumeManager at initialization and supposedly this may become invalid after file operations. This is supposedly how some FARTfs impls work. Most info about FAt is in old fatfs docs that are degrading off the internet or the source code of the lib we use..

@misterinterrupt
Copy link
Collaborator Author

another thing to consider here is that there is no 'unmount' and we may ought to unmount it when switching from sd logging to usb mounted by crumprutr

@ZavenArra
Copy link
Contributor

Looks like the crash was just something to do with the rprintln, the other functionality in your logging is correct. it looks like you have a temperature ring configured?

@ZavenArra
Copy link
Contributor

i have been getting really weird stack trace behavior when there is a UTF8 decoding error, so that might have been what happened with your rprintln. The SD card stuff works reliably currently, and this branch does not contain any of the USB stuff (which you are correct in noting does indeed require an 'unmount')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants