I just got a chance to look at the code. As you may known the MRAM is divided into two partitions. Partition 0 contains the various states info that we want to keep as well as FileUploadsTable (and I don't really know what that is). But at the start and end of this partition is a uint32_t containing the version number of the MRAM layout. The version number is in the code as a constant (MRAMmap.h MRAM_VERSION), and it is written into the mram when it is initialized. If you change the structure, you SHOULD change the version number, but if you don't and the length of the stuff in the middle changes, you will get the warning. If you do change the version number in the code but don't init the MRAM you also get the warning. HOWEVER, of course if the MRAM gets messed up even if the structure is unchanged, you get the same message. One thing between the two version cells is
InProcessFileUpload_t FileUploadsTable[MAX_IN_PROCESS_FILE_UPLOADS];
I don't know what this is, but given that it is an array, it seems a likely possibility that it could have overflowed and wiped out the second version cell and cause your problem. It would also flow into partition 1, which contains the file system, so that could also get messed up.
I hope this helps...
73,
Burns Fisher, WB1FJ *AMSAT(R) Engineering -- Flight Software*
On Thu, Oct 12, 2023 at 1:38 PM Chris Thompson via pacsat-dev < pacsat-dev@amsat.org> wrote:
Yes. I've don't it. I will monitor to see when I get it again.
73 Chris
On Thu, Oct 12, 2023, 12:26 Burns Fisher (AMSAT) via pacsat-dev < pacsat-dev@amsat.org> wrote:
Have you done the clear mram to start again? How long before you get the error again? 73,
Burns Fisher, WB1FJ *AMSAT(R) Engineering -- Flight Software*
On Thu, Oct 12, 2023 at 12:07 PM Chris Thompson via pacsat-dev < pacsat-dev@amsat.org> wrote:
I'm unsure if it really messes up the receiver or if that is just a coincidence. I made the receiver work by rebooting the windows laptop that controls the ground station. Go figure.
But the MRAM definitely sees this issue. I see the message at reboot.
73 Chris
On Thu, Oct 12, 2023, 11:00 Burns Fisher (AMSAT) via pacsat-dev < pacsat-dev@amsat.org> wrote:
Hmm. There is a place in the MRAM (maybe one at the beginning and one at the end?) with a version number. When you init the MRAM, the version number in the code (I think it is in the header file that defines the contents of the MRAM) is written into that/those spot/s. Then it compares, I think in the console code every command (it is really easy to miss otherwise). I don't think I compare it anywhere else.
Assuming you did not change the layout, my first thought would be that when we put the file system into the MRAM, the version number is somehow overlayed so it gets changed when some particular thing happens in the file system. Or maybe the file system overflows? If it is that latter (an overflow) that could end up corrupting the file system. Would that explain why the receiver is not working? Of course you can clear mram..I suppose that means you have to re-init the file system too?
73,
Burns Fisher, WB1FJ *AMSAT(R) Engineering -- Flight Software*
On Thu, Oct 12, 2023 at 10:41 AM Chris Thompson via pacsat-dev < pacsat-dev@amsat.org> wrote:
Burns (and others),
I think there is a bug that corrupts MRAM. From time to time I get the message "*****MRAM layout has changed. You must issue clear mram******" even though I have not changed the layout. What causes that? It looks like it may then cause an issue where the receiver does not work.
73 Chris
-- Chris E. Thompson chrisethompson@gmail.com g0kla@arrl.net
pacsat-dev mailing list -- pacsat-dev@amsat.org View archives of this mailing list at https://mailman.amsat.org/hyperkitty/list/pacsat-dev@amsat.org To unsubscribe send an email to pacsat-dev-leave@amsat.org Manage all of your AMSAT-NA mailing list preferences at https://mailman.amsat.org
pacsat-dev mailing list -- pacsat-dev@amsat.org View archives of this mailing list at https://mailman.amsat.org/hyperkitty/list/pacsat-dev@amsat.org To unsubscribe send an email to pacsat-dev-leave@amsat.org Manage all of your AMSAT-NA mailing list preferences at https://mailman.amsat.org
pacsat-dev mailing list -- pacsat-dev@amsat.org View archives of this mailing list at https://mailman.amsat.org/hyperkitty/list/pacsat-dev@amsat.org To unsubscribe send an email to pacsat-dev-leave@amsat.org Manage all of your AMSAT-NA mailing list preferences at https://mailman.amsat.org
pacsat-dev mailing list -- pacsat-dev@amsat.org View archives of this mailing list at https://mailman.amsat.org/hyperkitty/list/pacsat-dev@amsat.org To unsubscribe send an email to pacsat-dev-leave@amsat.org Manage all of your AMSAT-NA mailing list preferences at https://mailman.amsat.org
pacsat-dev mailing list -- pacsat-dev@amsat.org View archives of this mailing list at https://mailman.amsat.org/hyperkitty/list/pacsat-dev@amsat.org To unsubscribe send an email to pacsat-dev-leave@amsat.org Manage all of your AMSAT-NA mailing list preferences at https://mailman.amsat.org
participants (1)
-
Burns Fisher (AMSAT)