Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 10 months ago.
Why can't I get PortOut to work?
Hi,
Tried using PortOut on FRDM-K64F EWB but without geting it to work.
Tried flashing the LED (on PTE26) with the following code - but no. The text comes out on the serial port though so the program is running.
Trying the same with DigitalOut works fine, but i'd rather use PortOut for what I am really aiming for.
What am I doing wrong?
/Mats
PortOut MyGPIOPort(PortE, 0x04000000); // LED on PTE26 RawSerial MyPort(PTC15, PTC14); int main() { MyPort.baud(115200); wait(0.1); MyPort.printf("Start LED flashing"); while(true) { MyGPIOPort=0; wait(1); MyGPIOPort=0x04000000; wait(1); } }
I'm having the same problem - my previously working PortOut code from the KL25Z doesn't seem to output any bits on the K64F. Would love a solution for this as I don't want to use DigitalOut.
posted by Jim Conner 26 Feb 2015Looking for the same information for the k22f ... DigitalOut is very slow and i'd like to see how PortOut can improve the speed.
posted by Jonathan Piat 11 Apr 2015I thought I must be doing something wrong. This is such basic functionality has there been any update?
posted by Dave Thomas 01 May 2015Still not working (FRDM-K64F). Reading back from the PortOut gets zero always.
posted by Paul Schooling 25 Nov 2015