stm32f1xx_HBL/drv/nvic_regs.h
Steins7 5e4d87474a Fix major reg bitfield issue
A while back, macros had to be put in place to avoid letting the
compiler directly use the bitfields. This was necessary because the
compiler used strb instruction which only write bytes. On the AHB bus,
byte writes are transformed into word writes by repeating the byte,
which caused mayhem in the registers. After a lot of research, turns out
the packed attribute stops the compiler from does optimal (word) writes
and isn't needed anyway. Removing them fixes the issue
2024-07-10 23:16:49 +02:00

40 lines
872 B
C

/** @file nvic_regs.h
* Module defining the Nested Vector Interrupt Controller (NVIC) registers.
*
* Mainly made to be used by the nvic module. It is recommanded to go through
* the functions provided by that module instead of directly using the registers
* defined here.
*/
#ifndef _NVIC_REGS_H_
#define _NVIC_REGS_H_
//--includes--------------------------------------------------------------------
#include "stdint.h"
//--type definitions------------------------------------------------------------
#define NVIC1_BASE_ADDRESS 0xE000E100
#define NVIC2_BASE_ADDRESS 0xE000EF00
struct NVIC1 {
uint32_t ISERX[3];
uint32_t ICERX[3];
uint32_t ISPRX[3];
uint32_t ICPRX[3];
uint32_t IABRX[3];
uint32_t IPRX[20];
};
struct NVIC2 {
uint32_t INTID;
};
//--functions-------------------------------------------------------------------
#endif //_NVIC_REGS_H_