1. Function SysCtlClockSet(), do not return error flag i.e if successful or not?
What if it failed? Is there any method to check. Currently I am doing like this:
uint32_t freq;
SysCtlClockSet(SYSCTL_SYSDIV_2_5 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ );
freq = SysCtlClockGet();
if(freq != 80000000)
{
/* error */
}
2. On startup, I keep all unsued pin as input pull up to avoid any random signal or current consumption.
Port A to D are full 8 bit. but PE6-7 & PF5-7 are not physically present on 64 pin IC.
Should I also make these pins as input-pull up or they are not in the device at all internally also?
3. What is purpose of giving different drive strngth of GPIO, i.e 2, 4 or 8ma.
What if on 2mA setting a led is connected which tries to consume higher current? Will only 2mA current flows through it?
4. GPIOPinRead function , returns in32_t type. That's not an issue.
I think better would be if it is done uint32_t.
I was oding like:
uint32_t val = GPIOPinRead(...);
& warning comes impilict conversion from int32_t to uint32_t.
Although explicit typecast be done to remove this.