Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Problems of stm32 in C language
Problems of stm32 in C language
To sum up, it is to tell the compiler that pao3 is an address value rather than an integer variable value, although their expressions are the same! Then analyze the above C language in detail. " u32 *pao3 "

The variable type is not u32, but u32*. It means that the address where the variable name pao3 is located is an address value. If it is u32, it means that only a 32-bit plastic data is stored. The address 0x4ffff000 1 stores 32-bit plastic data, which can be the value of a plastic variable or a 32-bit register. The (u32*) after the assignment statement is a cast. The assignment must be consistent with the defined variable. You can also try changing that sentence to U32 * Pao3 = (U32) (0x4fff0001) or u32 *pao3=0x4FFF000 1+0, and an error will occur. The compiler thinks that you assigned an integer variable to a pointer variable. So if you want to take the value of this register (0x4FFF000 1), take *pao, such as printf("%x\n ",*pao). If you are in a computer, you will get the display of13247a1a.