This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

usart inline functions show strange values

I've another question: I installed the usart which is already working but there's something which I don't really understand.

AT91F_PMC_EnablePeriphClock ( AT91C_BASE_PMC, 1<<AT91C_ID_US1 );

That's one function (the first one) to install the usart. It's an inline function from atmel

__inline void AT91F_PMC_EnablePeriphClock (
        AT91PS_PMC pPMC, // \arg pointer to PMC controller
        unsigned int periphIds)  // \arg IDs of peripherals to enable
{
        pPMC->PMC_PCER = periphIds;
}

When I set an beakpoint to AT91F_PMC_EnablePeriphClock, than I see in the watch window the variable periphIds and pPMC with values which are not correct; e.g. pPMC = periphIds = 0x00102786. After the execution of this function AT91F_PMC_EnablePeriphClock, the values in the watch window don't change.

pPMC is a register base address, including many other register values and all the values I see in the watch window are the same values which I can see in the memory window at the specific location - e.g. 0x00102786

If I change the code size from my project than the value is another one - but not the right one.

JChris

0