Starting from:

$25

CSE2240 - Lab4 - Solved

About coding
The function of this c code is to let the LEDs blink, so does the covert ARM assembly code. Next week, we are going to run the ARM assembly code on KEIL STM STM32C Eval BD & ULINK-ME board (device MCBSTM32CUME). We will see something real then.

For this lab, our main work will be converting the code. Thus, instead of showing these values on LEDs, we are going to store these values in memory (make sure these values won’t mess up in memory). You can decide where to store (the memory address) these values. 10 values will be fine.  Hint 

For this lab 
•       Before start coding, do some research for operator “<<” and “|=”.

•       The value of RCC->APB2ENR and GPIOE->CRH is given in the c code. For ARM assembly, assign AD_val with 0x100.

•       You could rename GPIOE->BSRR to R0 with command “GPIOE->BSRR RN R0” for your convenience.

For next lab 
        •    You could do some research for pins appear in the c code (like LED_NUM, AD_val,

RCC->APB2ENR, GPIOE->CRH, GPIOE->BSRR). They may just be variables for this lab, but will be meaningful for next lab. Better understanding of these pins will help you a lot next week.



     

 

More products