Serial: pinmap not found

13 Oct 2010

Hi

This is one of those basic beginners questions, but I haven't found anything with "pinmap not found" in it. So here it is:

I have a strange problem with the Serial Hello World program. After configuring Tera-Term, and hitting  the reset button, I was surprised to see the message "pinmap not found" displayed on Tera-Term (instead of "Hello World" indeed). This message would display again at every reset.

Is this some exception occurring in the Serial library, and why? If the device can send this message through the USB/Serial, a lots have happened already

#include "mbed.h"              

Serial pc1(USBTX, USBRX); // tx, rx

int main() {
    while(true)
    {
        pc1.printf("Hello World!\n");
        wait(100);
    }
}

Thanks

JP

13 Oct 2010

Hi JP,

The message "pinmap not found" means the mapping between the pins you supplied and an underlying hardware block couldn't be resolved.

For example, if you requested a serial port on pins (p9, p10), that is fine, as p9 is tx and p10 is rx for a UART block. But if you requested e.g. (p9, p11) or (p10, p9), you'd get this error as it can't be met.

The example you provide looks fine, and it compiled and ran as expected, so I wonder if this is exactly the program you saw the behaviour on; perhaps the pins were slightly different, or you had some other interfaces which were causing the error (need not be Serial).

Simon

14 Oct 2010

Thanks Simon,

 

Your reply was very useful. I realized that one of the modules linked to my program had a buggy I2C pin assignment. So for the benefit of others, here is an easy way to reproduce the error (replace p29 by p27 to restore to working condition)

#include "mbed.h"              

Serial pc(USBTX, USBRX); // tx, rx
I2C i2c(p28, p29);      // SCL is not on p29 but on p27!

int main() {
    while(true)
    {
        pc.printf("Hello World!\n");
        wait(1);
    }
}

Cheers

JP

20 Feb 2011

this also happens if you switch the RX and TX pins around.

14 Feb 2012

It also happens sometimes (!) when you try to open two Serial ports on an LPC11U24. Looks like that one literally only has one UART. Meaning you can't even run the one at p9,p10 while keeping a USB-serial connection open to your PC for debugging ....

Or did I maybe miss something?

This works:

#include "mbed.h"

Serial u(USBTX,USBRX);
//Serial x(p9,p10);

int main() 
{
    while (1==1)
        u.printf("Hello World!");
}

While that doesn't:

#include "mbed.h"

Serial u(USBTX,USBRX);
Serial x(p9,p10);

int main() 
{
    while (1==1)
        u.printf("Hello World!");
}
04 Nov 2019

Thank you ! this solved my problem!