cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L0 HAL status bit or a flag read from registers

azgard
Associate

Hello, there is a bullet in the STM32L0 HAL that escape me. On page 38 of UM1749 it is said:

"When a status bit or a flag is read from registers, it is composed of shifted values depending on the number of read values and of their size. In this case, the returned status width is 32 bits. Example : STATUS = XX | (YY << 16) or STATUS = XX | (YY << 8) | (YY << 16) | (YY << 24)".

Can someone give me a function/macro that implements it so I can look at its implementation?

Does anyone know what case "In this case" refers to?

Does anyone know what XX and YY refer to?

If someone can give me a concrete example, I would greatly appreciate it.

1 ACCEPTED SOLUTION

Accepted Solutions
Patrice LF
ST Employee

Hello,

To share with you that this bullet will be removed from now on in future User Manuals describing the STM32 HAL and low-layer drivers published per STM32 series.

Regards

View solution in original post

3 REPLIES 3
Pavel A.
Evangelist III

IMO this bullet just means that some library APIs return combination of several hardware bit fields as one 32-bit value. Nothing more meaningful there.

> Does anyone know what XX and YY refer to?

Hard to tell. In the 1st part of the sentence they are unsigned 16-bit values. Then some nonsense.

Patrice LF
ST Employee

You are right @Pavel A.​ 

There is no real implementation from what I am aware of in the HAL drivers.

Patrice LF
ST Employee

Hello,

To share with you that this bullet will be removed from now on in future User Manuals describing the STM32 HAL and low-layer drivers published per STM32 series.

Regards