How to change VBUS Valid threshold value? (4.4V to 4.1V)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to change VBUS Valid threshold value? (4.4V to 4.1V)

570件の閲覧回数
stanley-kylee
Contributor II

Hello.

I want to change VBUS Valid threshold value.

According to the RT1020 reference manual, the valid state of VBus can be checked by checking AVV (A VBus Valid). However, this value is Read Only.

I found 'USB VBUS Detect Register' in the reference manual. It seems that the 'VBUSVALID_THRESH' of this register is adjustable from 4.0V to 4.7V, and 4.4V is confirmed as the default value. I actually confirmed that AVV was detected or not detected based on 4.4V.

I want to change this value to 4.1V.
It only needs to change the AVV state when a voltage of 4.1V or higher is applied.

It seems that the USB_ANALOG Register Masks part of the RT1021 header file (MIMXRT1021.h) adjusts the value, but I'm not sure.

How to change VBUSVALID_THRESH value from 4.4V to 4.1V?

Thank you for your reply. Have a nice day.

 

0 件の賞賛
2 返答(返信)

528件の閲覧回数
PabloAvalos
NXP TechSupport
NXP TechSupport

Dear @stanley-kylee 

 

Thanks a lot for reaching our technical support.

 

Regarding your question, in order to have this 4.1V on the VBUSVALID_THRESH, you just have to re-define with another name or sending to the macro USB_ANALOG_VBUS_DETECT_VBUSVALID_THRESH(x), the "x" with the corresponding value shown in green (in this case 0b001 = 0x01U):

PabloAvalos_0-1677194771837.png

 

Hope that is helpful for you!

 

Best Regards.
Pablo Avalos.

0 件の賞賛

514件の閲覧回数
stanley-kylee
Contributor II

Hello @PabloAvalos 
Thank you for your reply.

Where should I send the "USB_ANALOG_VBUS_DETECT_VBUSVALID_THRESH(0x1U)" macro value?
Or can I just use the code below?

uint32_t tmp32 = ehciRegisterBase->OTGSC;
tmp32 |= USB_ANALOG_VBUS_DETECT_STAT_VBUS_VALID(0x1U);
ehciRegisterBase->OTGSC = tmp32;

However, since VBUSVALID_THRESH is related to USB ANALOG, it does not seem to be set in the OTGSC register.
More detailed information please.

Thank you.

0 件の賞賛