Not applicable
May 12, 2018
03:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 12, 2018
03:46 AM
Hello I have got a Problem,
I will declare Ports as Output.
For example Port 5 works but on Port 15 it doesn’t 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 doesn’t 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
- Tags:
- IFX
2 Replies
Not applicable
May 16, 2018
10:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 16, 2018
10:39 AM
Check the PDISC register
May 17, 2018
05:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 17, 2018
05:01 AM
Ports 14 and 15 can be used only for analog and digital input, no output. I guess it is because they are shared with the ADC.
Unfortunately the pin placement tool tries as hard as it can to hide information from you.
Unfortunately the pin placement tool tries as hard as it can to hide information from you.