9 years, 7 months ago.

Pin name "NC" courses Lights of Death

Reanimating (an recompiling) an old project I got LoD immediately after starting the run. Over USB-serial I got this: "mbed assertation failed: pin != (PinName)NC, file: C:\work\mbed\github\libraries \mbed\targets\hal\TARGET_NXP\TARGET_LPC176X\pinmap.c, line 32"

Affter changing SPI spi2(p11, NC, p13); to SPI spi2(p11, p12, p13); Program works as it used to work.

Uwe

Question relating to:

2 Answers

9 years, 7 months ago.

Well that explains why I had the same issue when testing some things. And sadly it is broken in every single pinmap.c file for every target. It should still work if you compile it with an old version of the mbed lib, but previously it was indeed possible to have pins in peripherals set as NC to simply not use those pins, but currently the pin_function function will halt the program with an error.

I agree it should be changed back.

Hi Erik,

the last revision of mbed it works is no. 80. In my project it doesn't matter to declare p12 in a SPI that has only output. But it was an advandage to declare input as NC because p12 could be used for something else.

In an other project I have in- and output of a serial interface (not USB-serial) in different threads. In this case it works only correct if you separate the physical Interface by to "virtual" one: <<code>>Serial inp(NC, p27), outp(p28, NC); <</code>> I haven't tested yet but I'm afraid this will not work anymore. Thus, I beg to reinstall the "NC"- option.

Uwe

posted by Uwe Haertel 09 Sep 2014
9 years, 1 month ago.

Is this still happening with the last version of the mbed library? Thanks for your help