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

Debug simulator RTT, SPI1 on AT91SAM7X256

RealView MDK-ARM Version: 3.80a
1) Why does not work debug simulator RTT?
My code:

// startup SAM7.c (default Keil)
#include <AT91SAM7X256.h>
int main(void){
// RTT_Init
//      AT91C_BASE_PMC->PMC_PCER = (0x01 << AT91C_ID_SYS); // ??????????

        AT91C_BASE_RTTC->RTTC_RTMR = AT91C_RTTC_RTTRST | AT91C_RTTC_RTTINCIEN | 0x000008000;
// or
        AT91C_BASE_RTTC->RTTC_RTMR = AT91C_RTTC_RTTRST;
        AT91C_BASE_RTTC->RTTC_RTMR = AT91C_RTTC_RTTINCIEN | 0x000008000;

        while(1) // <- RTT_VR(CRTV) is not changed ???
}


2) Why does not work debug simulator SPI?
My code:

int main(void){
// Configure PIO controllers
....

        AT91C_BASE_PMC->PMC_PCER = (0x01 <<  AT91C_ID_SPI1);

        AT91C_BASE_SPI1->SPI_CR = AT91C_SPI_SWRST;
        AT91C_BASE_SPI1->SPI_CR = AT91C_SPI_SPIEN | AT91C_SPI_LASTXFER;
// <- SPI1_CR is not changed ???

        AT91C_BASE_SPI1->SPI_MR = AT91C_SPI_MSTR | AT91C_SPI_PS | AT91C_SPI_MODFDIS;

        AT91C_BASE_SPI1->SPI_CSR[0] = AT91C_SPI_CPOL | AT91C_SPI_CSAAT | AT91C_SPI_BITS_16 | (0x04 << 8);

        AT91C_BASE_SPI1->SPI_TDR = 0x0654321;
// <- SPI1_TDR is not changed ???
        while(1)
}


Where I mistaken?
P.S.: Not changing registers review in mode of the debug simulator Peripherals.
Thank

0