Hi all, i have some questions, could you help me? //And sorry for my english
1) I'm trying to understand tutorials for k40 and in all tutorials i saw 'k40_TOWER_BOARD_SUPPORT.h'/'k40_TOWER_BOARD_SUPPORT.c'
where can i find that sources?
2) What mean 'PORT_PCR_MUX(1)'?
Thnx for helping.
Solved! Go to Solution.
Hi Gerasin,
Answering your second question PORT_PCR_MUX(1) is a mask which writes to the MUX field on PCR register. Look for Pin Control Register n (PORTx_PCRn) in the Reference Manual. In MUX field you can write from 0 to 7 in order to select Alternative number.
In section K40 Signal Multiplexing and Pin Assignments you can see the function for each Alternative (ALTx), in this case writing 1 (0b001) to MUX field ALT1 will be selected for that pin; for most of the pins ALT0 configures them as GPIO (GeneralPurposeInput/Output).
Answering your first question, if you can´t find those files you can create them and add them to your project:
Let me know if you have any problems.
Hope this helps.
I have another stupid question: how to burn/"save" program to k40, so after reset or turn off-on k40, program will start again? Autonomous work , i mean. And what typical solution about autonomous power supply?
Hi,
You need compile you code in Flash mode. In Flash memory your application will be there after power-up again. Check the image below:
Click on the name of the project and then this will show up.
You can check datasheet of your product and see the list of power options, you can use the USB input to power on.
I tried it, but it does not work.
Hi,
I assume that you are using for your project the Codewarrior´s console, you can see it in debug mode , it is in the lower part of the window; it shows what printf returns. So when you disconnect the board and try autonomous mode it is looking for the Codewarrior´s console and never find it.
If you are using printf in your project and really don´t need it for autonomous behavior just erase them, maybe that is happening.
Hope this helps.
I have followed the steps above . But it is not working in power on reset ie once when we unplug and replug the power to the kwikstik k40 Board.
Reply me soon if anyone can pls....
Did you unplug the debug BDM? I have seen it where it hols the board reset.
Friend, I cant understand BDM. Is it Background Debug Mode? Then how to unplug that BDM. Pls reply me soon
Thank you, it really helpful.
But i have another problem with line scan camera tutorial, and then i starts programm, it doesn't work, and return: "No source available for "0xFFFFFFFE (0xFFFFFFFE)() " "
In assambley code last strokes:
fffffff6: .short 0xbabababa
fffffffa: .short 0xbabababa
fffffffe: Unable to retrieve disassembly data from backend.
ffffffff: Unable to retrieve disassembly data from backend.
I think it's not correct, but i havo no idea how to fix it.
Hi,
I have never experienced that issue, but try to look for this problem in some threads of the community. In this one you can find some tips to solve it: unable to debug in my MCU (kenetis k53 )
Hope this helps.
Hi Gerasin,
Answering your second question PORT_PCR_MUX(1) is a mask which writes to the MUX field on PCR register. Look for Pin Control Register n (PORTx_PCRn) in the Reference Manual. In MUX field you can write from 0 to 7 in order to select Alternative number.
In section K40 Signal Multiplexing and Pin Assignments you can see the function for each Alternative (ALTx), in this case writing 1 (0b001) to MUX field ALT1 will be selected for that pin; for most of the pins ALT0 configures them as GPIO (GeneralPurposeInput/Output).
Answering your first question, if you can´t find those files you can create them and add them to your project:
Let me know if you have any problems.
Hope this helps.