led blinking
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-06 6:09 AM
good morning
i want to create a simple led blinking code. for that, i got the path of the led 8 of my aek-mcu-c4mlit1. it is pk1gpio1 and is connected to the branch 25. i connected it on the gui and wanted to code in my main. unfortunately, C recognizes port k but not the pin that i just pinned and the function that makes it blinks. so my 2 questions are: how to make it recognize the pin and how to get functions that work
kind regards
Solved! Go to Solution.
- Labels:
-
AutoDevKit Studio
-
MCU board
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-06 9:14 AM
Hi Jad,
in my copy and paste there was an error.
Pls replace the line:
siul_lld_readpad(PORT_PIN_GPIO36, PIN_GPIO36);rqIsrEnable();
with
siul_lld_readpad(PORT_PIN_GPIO36, PIN_GPIO36);
now it should work.
Thanks,
AutoDevKit Team
P.S.
if you open the welcome page in AutoDevKit, see the image below, you can find the same tutorial that can help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-06 6:45 AM
Hi Jad,
After you set a pin in the Pin Map Editor you have to:
- Save and close the Pin Map Editor.
- Save the project.
- Generate the code (click on the following icon).
After this step, you will see that the tool recognizes the PIN Name as a variable.
In your case, if the name of the PIN is PIN_GPIO161, the function you are using wants as a parameter (PORT_PIN_GPIO0161, PIN_GPIO0161).
Thanks,
AutoDevKit Team
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-06 6:52 AM
thank you very muh for the quick response. neverless, i still have the same error messages and now my pinmap editor has completly changed and there is no more gpio 161 at branch 25. the number of branch ha reduced and is no more le the number on my data sheet
kind regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-06 7:00 AM
Hi Jad,
pls. start from scratch, crate new project and follow
the steps I suggested before, it should work.
Thanks,
AutoDevKit Team.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-06 7:11 AM
thanks, it worked for the pin :) neverless i still have the other main problem : the error undefined reference to `pal_lld_setpad'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-06 7:13 AM
Hi Jad,
use "siul_lld_setpad..."
Thanks,
AutoDevKit Team
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-06 7:16 AM
unfortunately i have the same error memssge: undefined reference to `siul_lld_setpad' by the way, from where could i get the informations on those functions ?(for now i was just used to copy them from other programs)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-06 7:27 AM
Hi Jad,
pls try this code:
int main(void)
{
/* Initialization of all the imported components in the order specified in
the application wizard. The function is generated automatically.*/
componentsInit();
irqIsrEnable();
for(;;)
{
siul_lld_readpad(PORT_PIN_GPIO36, PIN_GPIO36);rqIsrEnable();
}
}
Thanks,
AutoDevKit Team
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-06 7:32 AM
this time the message error is undefined reference to `rqIsrEnable'. would you know where i could get informations on this functions so i understand if there is mising librarys that i should include?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-06 9:14 AM
Hi Jad,
in my copy and paste there was an error.
Pls replace the line:
siul_lld_readpad(PORT_PIN_GPIO36, PIN_GPIO36);rqIsrEnable();
with
siul_lld_readpad(PORT_PIN_GPIO36, PIN_GPIO36);
now it should work.
Thanks,
AutoDevKit Team
P.S.
if you open the welcome page in AutoDevKit, see the image below, you can find the same tutorial that can help.
