Skip to content

registers: flashctl#31

Closed
i509VCB wants to merge 1 commit intomspm0-rs:masterfrom
i509VCB:mspm0-flash
Closed

registers: flashctl#31
i509VCB wants to merge 1 commit intomspm0-rs:masterfrom
i509VCB:mspm0-flash

Conversation

@i509VCB
Copy link
Member

@i509VCB i509VCB commented Jan 20, 2026

Copy link
Contributor

@henopied henopied left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just a few suggested tweaks to improve the generated code.

- name: VAL
description: Command Byte Enable value. A 1-bit per flash word byte value is placed in this register.
bit_offset: 0
bit_size: 18
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we may want to further annotate this with the ECC byte and turn the data bytes into a bit field (along with updating the description to clarify that ECC is controlled here.) For the time being, we may also want to reduce this to 9 bit/64 bit mode based on our discussion as there seems to be something fishy going on wrt the SDK's usage in 128-bit mode.

- name: DISABLE
description: Disable.
value: 1
enum/STAT:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potentially useless enum.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should stay, as it is a status enum where one variant is there was no interrupt.

- name: BANK
description: Operate on an entire flash bank.
value: 5
enum/SSERASEDIS:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potentially useless enum.

description: Command Execute Register.
fields:
- name: VAL
description: Command Execute value Initiates execution of the command specified in the CMDTYPE register.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correcting typos and using the extended description from TRM: "Command Execute value. Initiates execution of the command specified in the CMDTYPE register. This register is blocked for writes after being written to 1 and prior to STATCMD.DONE being set by the flash wrapper hardware. Flash wrapper hardware clears this register after the processing of the command has completed."

description: Override hardware generation of ECC data for program. Use data written to CMDDATAECC*.
bit_offset: 17
bit_size: 1
- name: SSERASEDIS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing PROGMASKDIS, ERASEMASKDIS.

bit_offset: 0
bit_size: 16
enum: SECTORSIZE
- name: NUMBANKS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add enum for consistency with others that specify min/max (e.g., MAINSIZE).

access: Read
fieldset: GBLINFO2
- name: BANKINFO0
description: Bank Information Register 0 for Bank 0.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe too tedious to patch, but these apply not just to bank 0.

- name: OVERRIDE
description: Use value from MAXERSPCNTVAL field as maximum erase pulse count.
value: 1
enum/MAXPCNTOVR:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potentially useless enum.

- name: HARDWARE
description: The interrupt or event line is in hardware mode. Hardware must clear the RIS.
value: 2
enum/MAXERSPCNTOVR:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potentially useless enum.

fieldset/STATCMD:
description: Command Status Register.
fields:
- name: CMDDONE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMD prefix is kind of redundant.

@henopied henopied mentioned this pull request Feb 1, 2026
@i509VCB i509VCB closed this Feb 18, 2026
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.

2 participants