CMSIS_6 icon indicating copy to clipboard operation
CMSIS_6 copied to clipboard

armv8-m register define doesn't include BPU

Open GuangMing34 opened this issue 2 years ago • 3 comments

In CMSIS/Core/Include/core_m33.h or CMSIS/Core/Include/core_starmc1.h, DWT related register define has been implemented, but BPU not.

GuangMing34 avatar Dec 18 '23 08:12 GuangMing34

DWT got added to access cycle counter for example, which can be used as independent timer source for Event Recorder. BPU is considered to be relevant for debuggers, only. What features of BPU are you missing from application point of view?

JonatanAntoni avatar Dec 18 '23 12:12 JonatanAntoni

Yes, some registers are designed to read/write by debugger only. DWT is also a debug component, cpu won't set it without debugger, it's no meaning. But these registers are still declared in register header file.

As BPU, some registers, FP_CTRL, FP_PIDx, FP_CIDx and other register, with default values, can still be read by v8m cpu with main extension. there are some information for soc sw engineers to read & check by cpu.

GuangMing34 avatar Dec 21 '23 07:12 GuangMing34

Hi @GuangMing34,

Sure, I think you are just the first one ever looking for these additional registers. Hence they got never added. Please feel free to contribute whatever you need access to. Or, if you don't feel confident raising a pull-request, let us know set set of registers you would like to have access to.

JonatanAntoni avatar Jan 08 '24 14:01 JonatanAntoni

Hi JonatanAntoni,

I have create a pull request(#174) for this issue.

Thanks~

GuangMing34 avatar Jun 13 '24 07:06 GuangMing34

Hi @GuangMing34,

I have tagged @AlbertHuang-CPU who is our expert for Star-MC1 to review your contribution. Many thanks for raising this.

JonatanAntoni avatar Jun 13 '24 07:06 JonatanAntoni

pull-request #174 already merged, this Issue can be closed. Thanks @JonatanAntoni and @AlbertHuang-CPU .

GuangMing34 avatar Jul 11 '24 01:07 GuangMing34