cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure the SPC560Bxx to use 5 Volts of power supply

Marcos_Andrade
Associate

Hello Community...

 

We are working on a project for the automotive area and one of the requirements is that the circuit is powered by a voltage of 5V. We will also have analog inputs that should read values ​​between 0 and 5V.

 

Reading the Reference Manual, we found the "CFlash Nonvolatile User Options register (NVUSRO)" which, according to our understanding, should have its PAD3V5V field written as 0, but we don't know exactly how to change/program the value of this register.


On our board the VDD_HV and VDD_HV_ADCx voltages are supplied by 5 volts.


All the board's peripherals (CAN/UART/Digital I/O, etc.) are working properly, however, when we put a voltage of 5 V on the pin used as ADC (PF[0],PD[13],PD[14] or PD[15]) it is crimped at a maximum value of 3.4V.

Could anyone help us better understand the reason for this maximum voltage at the ADC input and also the procedure for writing to NVUSRO?

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Erwan YVIN
ST Employee

Hello Marcos ,

You have to reprogram the shadow flash (Example code below)

https://community.st.com/t5/microcontrollers/shadow-flash-erase/td-p/390593

This code should be launched from RAM

Example the register to update in the shadow flash function

	/* program NVUSR0 */
	*(unsigned int*)0x203E18 = 0x7FFFFFFF;	/* interlock write */
	*(unsigned int*)0x203E1C = 0xFFFFFFFF;	/* due to ECC we have to write 64bits at a time */

    Best regards

                     Erwan

 

View solution in original post

1 REPLY 1
Erwan YVIN
ST Employee

Hello Marcos ,

You have to reprogram the shadow flash (Example code below)

https://community.st.com/t5/microcontrollers/shadow-flash-erase/td-p/390593

This code should be launched from RAM

Example the register to update in the shadow flash function

	/* program NVUSR0 */
	*(unsigned int*)0x203E18 = 0x7FFFFFFF;	/* interlock write */
	*(unsigned int*)0x203E1C = 0xFFFFFFFF;	/* due to ECC we have to write 64bits at a time */

    Best regards

                     Erwan