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

A Problem in Simulator while performing some simple GPIO operations

A Problem in Simulator while performing some simple GPIO operations
The Complete Code is shown below,nothing more,just to set the 4 lower bits of GPIOA at the start then clear them by using two registers that have the similar functions.Using software Simulator to test these codes,however,I surprisingly find that,after the execution,the 4 lower bits of GPIOA are still Ones,the content of BSRR and BRR is weirdly set to all 32 zeros?I tried to do it manually in the System Viewer by setting the corresponding bits in the BSRR and BRR,but it seems that the simulator will always leave the boxes unchecked automatically and instantly right after each click.Now I am at a loss as to what to do.Could someone give me a hand?
IDE:Keil MDK version:4.73
Chip:STM32F103RCT6
CODE:
#include <stm32f10x.h>
void SystemInit(void)
{ ;
} int main(void)
{ while(1) { GPIOA->CRL = 0x3333; GPIOA->ODR = 0xF; GPIOA->BSRR = 0xF<<16; GPIOA->BRR = 0xF;

}
} Additional MAP of the chip memory(added,so it won't generate an ACCESS VIOLATION error):
MAP 0x40010800,0x400123FF READ WRITE

PS:Memory watch window shows(at the address 0x4001080C) the content of the BSRR and BRR registers is changed accordingly but the lower bits of the GPIOA still remain set.

  • Partially right,even though it's said on its website that the peripheral simulations of STM32F103RCT6 are not currently available,in fact,you can simulate the operations by setting the properties of the project and by choosing "DASMSTM.dll" as its dialogue dll with the -pSTM32F103RC argument and others remaining default.
    I tried it and it works.