LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

pwm doesn't work with MCB2300 generic elemental I/O

I have built a custom LPC2378 board based off the MCB2300 board.  The PWM outputs work when I set the target up as a MCB2300 board, but do not work when I set the target up as other with the processor set to LPC2378 and the elemental I/O configured as MCB2300 generic.  All of the other elemental I/O functions, serial, and ethernet seem to work OK.  I would just use the MCB2300 setup, but I need more of the I/O than is available in that configuration.

 

Thanks,

 

John

0 Kudos
Message 1 of 4
(6,897 Views)

John,

 

I believe I have an explanation for you, but I am working with our ARM developers to ensure the following statement is correct. 

 

Tier 1 devices such as the MCB2300 differ in their implementation or "completeness" compared to Tier 2 devices such as the LPC2378. When you write a value to a PWM channel you are actually passing the value to a piece of c-code that is compiled and run with your LabVIEW program. This c-code can be found at the following path: 
C:\Program Files\National Instruments\LabVIEW 8.6\Targets\Keil\Embedded\lib\MCB2300_PWM.c 

 

Since the MCB2300G Elemental I/O does not also have this same underlying code (because it is Tier 2) we can expect the code not to work.   

 

In order to implement this functionality you can follow the information contained in the Elemental I/O section for the ARM porting guide.   It also might be possible to port the MCB2300_PWM.c code for the MCB2300G without going through the steps for the ARM porting guide.  I will also investigate this for you and post the results on my investigation in this thread.

 

Cheers,

Mark

 

Mark
NI App Software R&D
0 Kudos
Message 2 of 4
(6,865 Views)

The PWM code on the MCB2300G should be identical to the MCB2300.

 

Which version of LabVIEW are you using?

 

Which PWM channel are you attempting to set?  Have you tried other channels?  Do they all not work?

 

You might try re-creting and re-dropping the EIO node on the LPC2378 target.

 

You could try running the attached project, where you would see LED P2.1 toggle if it is running correctly.

 

If you would like to stick with the MCB2300 target, you can use low level VIs to toggle IO pins, but it can cause other problems if you do this.  See my post at:  http://forums.ni.com/ni/board/message?board.id=420&thread.id=620&page=4

0 Kudos
Message 3 of 4
(6,835 Views)
I have verified this behavior is a bug, and it has been reported to R&D.  The Corrective Action Request (CAR) ID for this bug is 169050).  
Mark
NI App Software R&D
0 Kudos
Message 4 of 4
(6,795 Views)