Skip to main content
FPros.1
Associate II
January 17, 2024
Solved

[SPC582B-DIS] SVD registers definition showing all zeroes

  • January 17, 2024
  • 2 replies
  • 1957 views

Hi there,

debugging serial demo for SPC582B I was hoping to observe internal LINFLEX_D1 registers for future use during application debug.

An ST employee helped me setting up the launch configuration, especially setting:

SVD Path: C:\SPC5Studio-6.0\openocd\svd\spc58\SPC582Bx.svd

 

During debug, all the peripherals are shown (inside the view 'Peripheral'). In the viw 'Memory', I can see the registers listed but their runtime values seem all 0s. If I add the same register as a watch expression, the actual value is 0x8184 (and it makes sense).

 

Could the SVD file be broken or is it something else?

 

Thanks for the support,

FP

This topic has been closed for replies.
Best answer by Erwan YVIN

Hello ,

sorry for my late answer

There are fonction to enable PCTL :

void pal_init(PALConfig *config) {
 // art #804106 Coredump issue on freegcc
 volatile uint16_t i;

#if defined(SPC5_SIUL2_PCTL)
 /* SIUL clock gating if present.*/
 SPCSetPeripheralClockMode(SPC5_SIUL2_PCTL,
 SPC5_ME_PCTL_RUN(2) | SPC5_ME_PCTL_LP(2));
#endif

         Best regards

                          Erwan

2 replies

Erwan YVIN
ST Employee
January 18, 2024

Hello , 

could you confirm the version of openocd or pls used ?

before to seeing the contents of the registers , you should enable the current PCTL.

try a test application for debug to display Peripheral.

             Best Regards

                          Erwan

                        

FPros.1
FPros.1Author
Associate II
January 18, 2024

Hi Erwyn,

thank you for the prompt reply.

 

Openocd version (used with SPC582B-DIS + stellar link winUSB driver):

C:\SPC5Studio-6.0\openocd\bin>openocd.exe --version
Open On-Chip Debugger 0.12.0+dev-00318-g0e98d766e (2023-05-17-15:52)

 

Is there a guide about enabling PCTL for the desired peripheral?

 

Thanks for the support,

FP

FPros.1
FPros.1Author
Associate II
January 23, 2024

Hi Erwyn,

is there any update on this?

 

Regards,

FP

 

Erwan YVIN
Erwan YVINBest answer
ST Employee
February 2, 2024

Hello ,

sorry for my late answer

There are fonction to enable PCTL :

void pal_init(PALConfig *config) {
 // art #804106 Coredump issue on freegcc
 volatile uint16_t i;

#if defined(SPC5_SIUL2_PCTL)
 /* SIUL clock gating if present.*/
 SPCSetPeripheralClockMode(SPC5_SIUL2_PCTL,
 SPC5_ME_PCTL_RUN(2) | SPC5_ME_PCTL_LP(2));
#endif

         Best regards

                          Erwan

FPros.1
FPros.1Author
Associate II
February 7, 2024

Hi Erwyn,

 

thanks for your help.

In my case, hardware registers' value were not showing for LIN UART peripheral so I am not sure your solution could solve my issue.

Anyway, in the mean time, ST support helped providing a patched version of SVD file for SPC582B mcu (other mcus were affected too), containing definition of a couple of missing registers in the LIN UART peripheral.

I am sure these patched SVDs will be part of future update(s). 

 

Thanks again :)

FP