Hello I am porting my application from MKE02 to MKE04. The development platform is KDS with Processor Expert. The problem I met is with the KBI. What I did on the MKE02 was defining my key interrupts on the KBI and also on the same pins set BitIO’s so I can poll for double key presses etc. If I want to do the same strategy on the MKE04 I get the Processor Expert error “Selected value is in conflict with other configuration property”. This was not the case on the MKE02. What to do? (The Input is configured for KBI interrupt as well as input).
your support is very much appreciated, kind regards Ad
Solved! Go to Solution.
Hi Ad van Gorp
If you are using the PE component, you can check that component help, there will have the according code for your reference.
Actually, if you just want to to read the PTB0... PTB3 input data.
You can read the register directly.
GPIOA_PIDR |= (1<<8) | (1<<9) | (1<<10) | (1<<11); // enable the input function
Then you can read GPIOA_PDIR data,and check bit8-bit11, it is the PTB0-PTB3 data.
Wish it helps you!
If you still have question about it, please kindly let me know.
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hello Kerry, thank you very much for your answer,
I understand that I have to do a low-level pin read without PE. Do you have an example of how I can do that?
Kind regards, Ad
Hi Ad van Gorp
Of course, we have a lot of low-level code about it, please download the code from these link:
https://www.nxp.com/webapp/Download?colCode=FRDM-KEXX-Driver-Library-Package&appType=license
SDK:
Welcome | MCUXpresso SDK Builder
Choose the board as KE04/02, then generate the code and download it.
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Thank you very much, you are the best.
Regards Ad
Hi Ad van Gorp,
You are welcome.
If this post answers your question, please click the "Mark Correct" button. Thank you!
If you have the new question in the future, welcome to create the new question post.
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hello Kerry, could you please be more specific on how to read the input bits PTB0..PTB3 without using the Processor Expert? I tried to incorporate the driver code "FRDM-KEXX-Driver-Library-Package" you linked but did not succeed, Thanks, Ad
Hi Ad van Gorp
If you are using the PE component, you can check that component help, there will have the according code for your reference.
Actually, if you just want to to read the PTB0... PTB3 input data.
You can read the register directly.
GPIOA_PIDR |= (1<<8) | (1<<9) | (1<<10) | (1<<11); // enable the input function
Then you can read GPIOA_PDIR data,and check bit8-bit11, it is the PTB0-PTB3 data.
Wish it helps you!
If you still have question about it, please kindly let me know.
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Kerry, exactly what I needed, thanks! Ad
Hi Ad van Gorp,
I have checked your attached project.
I know what's going on.
You can't select the same pin in the different module in the PE component, otherwise, it will report the conflict problems.
1. You KBI0 choose the PTB0
2. BitIO module, you choose the PTB0 again
So, you meet the problems.
If you want to use PTB0 as KBI0 pin, please don't configure other module eg BitIO to PTB0 again.
If you want to get the PTB0 GPIO input status, you totally can use the register control code in the project directly, you don't need to configure the PE module.
Wish it helps you!
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hello Kerry, thank you for the fast response. Below the screenshots you asked for the first seen from the KBI component and the second one from the BitIO.
The problem is on pins PTB0,PTB1,PTB2 and PTB3 as I use the QFP 64-pin package the pin numbers are 34, 33, 32 and 31.
As asked for I created a new project with the MKE04z processor and imported the Processor Expert settings from the
MKE02 project, this gave the error also.
Then I deleted all imported components and created a new KBI and BitIO component on the same input pin which did not solve the problem.
Please advise, Thank you, Ad
Hi Ad van Gorp,
Could you please share the new created KDS project which have the problems?
From your picture, your KBI selected pin is conflict with other component, I will help you to check the details.
Have a great day,
Kery
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Ad van Gorp,
Please also share some screenshots about your problems.
Which detail pin you used meet that problem?
Maybe you also can try to create a new project for KE04, and refer to the KE02 to configure the PE component again, that may doesn't have problems.
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------