Hello I have got a Problem,
I will declare Ports as Output.
For example Port 5 works but on Port 15 it doesnt work. I think I forgot a Register. Can somebody help me?
#define SETUPPAGE_2 (11UL)
volatile uint32_t *_Port_IOCR;
volatile uint32_t *_Port_OMR;
#define OUTPUT_PUSHPULL (0x10UL)
#define _Bit (9)
int main (void)
{
//GPIO DB1(5,8,OUTPUT_PUSHPULL);
_Port_OMR = &(PORT5->OMR);
_Port_IOCR = &(PORT5->IOCR8);
*_Port_IOCR &= ~(0x1FUL << SETUPPAGE_2);
*_Port_IOCR |= ((OUTPUT_PUSHPULL & 0x1FUL) << SETUPPAGE_2);
void timing_delay(void);
while (1)
{
*_Port_OMR |= (1<<_Bit);
} // while schleife
} //main schleife
I will declare Ports as Output.
For example Port 5 works but on Port 15 it doesnt work. I think I forgot a Register. Can somebody help me?
#define SETUPPAGE_2 (11UL)
volatile uint32_t *_Port_IOCR;
volatile uint32_t *_Port_OMR;
#define OUTPUT_PUSHPULL (0x10UL)
#define _Bit (9)
int main (void)
{
//GPIO DB1(5,8,OUTPUT_PUSHPULL);
_Port_OMR = &(PORT5->OMR);
_Port_IOCR = &(PORT5->IOCR8);
*_Port_IOCR &= ~(0x1FUL << SETUPPAGE_2);
*_Port_IOCR |= ((OUTPUT_PUSHPULL & 0x1FUL) << SETUPPAGE_2);
void timing_delay(void);
while (1)
{
*_Port_OMR |= (1<<_Bit);
} // while schleife
} //main schleife