Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fmu-v6xrt: MTD use full FRAM (32KB) #23360

Merged
merged 1 commit into from
Jul 5, 2024
Merged

Conversation

PetervdPerk-NXP
Copy link
Member

MTD was only using 4KB of the 32KB available on the fram, increase block counts.

davids5
davids5 previously approved these changes Jul 3, 2024
@dk7xe
Copy link
Contributor

dk7xe commented Jul 3, 2024

This solves the problem of parameter write error due to full mtd param stack on Pixhawk6X-RT with release/1.15

Issue seen on Pixhawk6X-RT with release/1.15

nsh> param save
ERROR [tinybson] file write error 60, errno:0 (Success)
ERROR [tinybson] killed: file write error
ERROR [tinybson] killed: write error on BSON_DOUBLE
ERROR [parameters] BSON append failed for 'RC5_MIN'
ERROR [parameters] parameter export to /fs/mtd_params failed (-1) attempt 1
ERROR [tinybson] file write error 60, errno:0 (Success)
ERROR [tinybson] killed: file write error
ERROR [tinybson] killed: write error on BSON_DOUBLE
ERROR [parameters] BSON append failed for 'RC5_MIN'
ERROR [parameters] parameter export to /fs/mtd_params failed (-1) attempt 2
ERROR [tinybson] file write error 60, errno:0 (Success)
ERROR [tinybson] killed: file write error
ERROR [tinybson] killed: write error on BSON_DOUBLE
ERROR [parameters] BSON append failed for 'RC5_MIN'
ERROR [parameters] parameter export to /fs/mtd_params failed (-1) attempt 3
ERROR [parameters] param export failed (-1)
ERROR [param] Param save failed (-1)
nsh> 


INFO  [mtd] Flash Geometry of instance 0:
  blocksize:      128
  erasesize:      128
  neraseblocks:   256
  No. partitions: 2
    partition: 0:
     name:   /fs/mtd_params
     blocks: 32 (4096 bytes)
    partition: 1:
     name:   /fs/mtd_waypoints
     blocks: 32 (4096 bytes)
  Device size: 64 Blocks (8192 bytes)
  TOTAL SIZE: 8 KiB
INFO  [mtd] Flash Geometry of instance 1:
  blocksize:      32
  erasesize:      32
  neraseblocks:   256
  No. partitions: 2
    partition: 0:
     name:   /fs/mtd_mft_ver
     blocks: 248 (7936 bytes)
    partition: 1:
     name:   /fs/mtd_net
     blocks: 8 (256 bytes)
  Device size: 256 Blocks (8192 bytes)
  TOTAL SIZE: 8 KiB
INFO  [mtd] Flash Geometry of instance 2:
  blocksize:      32
  erasesize:      32
  neraseblocks:   256
  No. partitions: 3
    partition: 0:
     name:   /fs/mtd_caldata
     blocks: 240 (7680 bytes)
    partition: 1:
     name:   /fs/mtd_mft_rev
     blocks: 8 (256 bytes)
    partition: 2:
     name:   /fs/mtd_id
     blocks: 8 (256 bytes)
  Device size: 256 Blocks (8192 bytes)
  TOTAL SIZE: 8 KiB

reference Pixhawk6X with PX4 1.14


nsh> mtd status
INFO  [mtd] Flash Geometry of instance 0:
  blocksize:      512
  erasesize:      512
  neraseblocks:   64
  No. partitions: 2
    partition: 0:
     name:   /fs/mtd_params
     blocks: 32 (16384 bytes)
    partition: 1:
     name:   /fs/mtd_waypoints
     blocks: 32 (16384 bytes)
  Device size: 64 Blocks (32768 bytes)
  TOTAL SIZE: 32 KiB
INFO  [mtd] Flash Geometry of instance 1:
  blocksize:      32
  erasesize:      32
  neraseblocks:   256
  No. partitions: 2
    partition: 0:
     name:   /fs/mtd_mft_ver
     blocks: 248 (7936 bytes)
    partition: 1:
     name:   /fs/mtd_net
     blocks: 8 (256 bytes)
  Device size: 256 Blocks (8192 bytes)
  TOTAL SIZE: 8 KiB
INFO  [mtd] Flash Geometry of instance 2:
  blocksize:      32
  erasesize:      32
  neraseblocks:   256
  No. partitions: 3
    partition: 0:
     name:   /fs/mtd_caldata
     blocks: 240 (7680 bytes)
    partition: 1:
     name:   /fs/mtd_mft_rev
     blocks: 8 (256 bytes)
    partition: 2:
     name:   /fs/mtd_id
     blocks: 8 (256 bytes)
  Device size: 256 Blocks (8192 bytes)
  TOTAL SIZE: 8 KiB
nsh> 

Pixhawk6X-RT with pr-v6xrt-use-full-32kb-fram

NuttShell (NSH) NuttX-11.0.0
nsh> mtd status
INFO  [mtd] Flash Geometry of instance 0:
  blocksize:      128
  erasesize:      128
  neraseblocks:   256
  No. partitions: 2
    partition: 0:
     name:   /fs/mtd_params
     blocks: 128 (16384 bytes)
    partition: 1:
     name:   /fs/mtd_waypoints
     blocks: 128 (16384 bytes)
  Device size: 256 Blocks (32768 bytes)
  TOTAL SIZE: 32 KiB
INFO  [mtd] Flash Geometry of instance 1:
  blocksize:      32
  erasesize:      32
  neraseblocks:   256
  No. partitions: 2
    partition: 0:
     name:   /fs/mtd_mft_ver
     blocks: 248 (7936 bytes)
    partition: 1:
     name:   /fs/mtd_net
     blocks: 8 (256 bytes)
  Device size: 256 Blocks (8192 bytes)
  TOTAL SIZE: 8 KiB
INFO  [mtd] Flash Geometry of instance 2:
  blocksize:      32
  erasesize:      32
  neraseblocks:   256
  No. partitions: 3
    partition: 0:
     name:   /fs/mtd_caldata
     blocks: 240 (7680 bytes)
    partition: 1:
     name:   /fs/mtd_mft_rev
     blocks: 8 (256 bytes)
    partition: 2:
     name:   /fs/mtd_id
     blocks: 8 (256 bytes)
  Device size: 256 Blocks (8192 bytes)
  TOTAL SIZE: 8 KiB
nsh> 

@dagar
Copy link
Member

dagar commented Jul 5, 2024

We should probably fully purge MTD_WAYPOINTS everywhere.

@dagar dagar merged commit ac1effa into main Jul 5, 2024
93 of 94 checks passed
@dagar dagar deleted the pr-v6xrt-use-full-32kb-fram branch July 5, 2024 14:25
@dk7xe
Copy link
Contributor

dk7xe commented Jul 7, 2024

@davids5 @PetervdPerk-NXP may one of you please take care that this is backportet to 1.15 please

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

Successfully merging this pull request may close these issues.

4 participants