PranabNandy / MCU-Driver-Development

0 stars 0 forks source link

MCU-Driver-Development

TRM: Information about Peripherals, peripheral implementtaiton, register sets, register config, clocks

Datasheet: Information about Pin details, electrical charecteristic

Screenshot from 2023-09-26 11-32-29

Function Block of STM32F40XX

Screenshot from 2023-09-20 21-28-41

STM32CubeIDE

Screenshot from 2023-09-23 01-45-36

Summary:

Screenshot from 2023-11-05 17-12-28

Boot Up:

For ARM you need to setup the vector table in the reset handler.

You need to locate the vector table at the offset directed by the VTOR register (Vector Table Offset Register)/ VBAR in Arm-A.

When ARM cortex boots up, it expects the first memory pointer by VTOR should be ( SP + reset Handler).

SP will store CPU core's SP and reset vector/handler to its PC.

Reset vector is the address to ISR that the core has to execute.

Screenshot from 2023-11-02 21-38-00

VTOR has point to a defined location.

We point VTOR to the starting address of Flash Memory (0x0800_0000)

Screenshot from 2023-11-02 23-10-56

Screenshot from 2023-11-05 14-09-25

Clock Gating

Screenshot from 2023-11-05 14-28-54

Clock Enable

Actually we need to go to APH1 peripheral clock to enable the GPIOA

RCC APB1 clock enable register ( by default all values are 0)

we have to enable some peripheral out of it

Screenshot from 2023-11-05 14-56-43

Screenshot from 2023-11-05 14-58-08

GPIO Mode setting

Screenshot from 2023-11-05 16-48-48 Screenshot from 2023-11-05 16-48-32 Screenshot from 2023-11-05 17-06-29

RCC Register Map

Screenshot from 2023-11-05 17-15-36

Now we know,