LabView for ARM - MCB2300 Audio
Hi, and thanks for reading!
My name is Chuck and I'm an undergrad ME student taking a mechatronics course. We were asked to create a proximity alarm with the MCB2300 and an IR proximity sensor. I have the entire program running correctly, but this lab has brought up a couple questions about how to better implement audio with the LabView for ARM processors.
I understand how interrupts work, and I've seen a couple examples online of using an interrupt with a timed loop, but I believe the current version of LabView (2010) doesn't support that feature any more. I had a couple questions about how to get a feature similar to this to work with LV 2010.
I was thinking I could have the proximity trigger enable an interrupt that I could use to generate higher quality audio than I am already making with a While - Timer loop. However, I'm not sure how to make an increment in the interrupt VI without using some form of a loop. The solution I'm thinking of at the moment is to make a For loop run once and to have an incrementing integer separate from the loop iteration (which would only go from 0 to 1) that stores its most recent value in the shift register.
My other question is about playing a sound file through the MCB2300. I wrote a VI that reads a .wav file and writes each sample as the output needed to drive a speaker, but that decompression turns a 10KB .wav file into a 300KB text file. I also don't have a way to really load the text file onto the board. Is there any reasonable way to go about this? I found an example online that processes audio data using the MicroVision software, but I don't want to learn a new language to implement this.
Sorry for such a long post, I just had a couple questions and was looking for some feedback. Any help would be greatly appreciated.
Thanks so much!
charlestrep91 wrote:
Hi everyone,
I just got my Labview for ARM cortex M3 evaluation kit and I can't download a simple program to the target. I'm using the Keil ULink 2 programmer and I get this error when compiling/downloading:
[4:23:16 PM] Status: Error
SWD Communication Failure
Error: Flash Download failed - Target DLL has been cancelled
Detail: [UVSC_PRJ_FLASH_DOWNLOAD, MSG: 0X100A, STATUS: Ex.] (1)
Status: FLASH download error.
I have read about this error and NI simply refers to Ulink2 user's guide which has this description for this error:
Serial Wire Debug communication is corrupted. The target SWD interface is not working properly. Mainly caused by the target: debug block not powered or clocked properly. Avoid Deep-Sleep modes while debugging. Lower the Max Clock frequency in the ULINK USB-JTAG/SWD Adapter section.
I have tried to "Lower the Max Clock frequency in the ULINK USB-JTAG/SWD Adapter section" but it didn't resolve the problem.
I have also tried to download the program using the usb port on the dev board but instead I get this error:
[4:51:22 PM] Status: ErrorUnexpected error occurred.
[Source: Target is in debug mode
Detail: [UVSC_PRJ_ADD_GROUP, MSG: 0x1002,
STATUS: 0xA] Code: 10]
What am I supposed to do with that?? I'm wondering if the dev board is defective. And this was supposed to be plug and play...
Any help is greatly appreciated!
I'll ask the obvious question, are you intending to use SWD or just download through the JTAG. Check your settings. I have not used the ARM with LV, but can you download anything using the Keil software? Give that a try. That may tell us where the problem lies. Try to duplicate your settings in LV from the Keil sw.
Reese, (former CLAD, future CLD)
Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
Similar Messages
-
LabVIEW for ARM 2009 Read from text file bug
Hello,
If you use the read from text file vi for reading text files from a sdcard there is a bug when you select the option "read lines"
you cannot select how many lines you want to read, it always reads the whole file, which cause a memory fault if you read big files!
I fixed this in the code (but the software doesn't recognize a EOF anymore..) in CCGByteStreamFileSupport.c
at row 709 the memory is allocated but it tries to allocate to much (since u only want to read lines).
looking at the codes it looks like it supposed to allocated 256 for a string:
Boolean bReadEntireLine = (linemode && (cnt == 0));
if(bReadEntireLine && !cnt) {
cnt = BUFINCR; //BUFINCR=256
but cnt is never false since if you select read lines this is the size of the file!
the variable linemode is also the size of the file.. STRANGE!
my solution:
Boolean bReadEntireLine = (linemode && (cnt > 0)); // ==
if(bReadEntireLine) { //if(bReadEntireLine && !cnt) {
cnt = BUFINCR;
and now the read line option does work, and reads one line until he sees CR or LF or if the count of 256 is done.
maybe the code is good but the data link of the vi's to the variables may be not, (cnt and linemode are the size of the file!)
count should be the number of lines, like chars in char mode.
linemode should be 0 or 1.
Hope someone can fix this in the new version!
greets,
Wouter
Wouter.
"LabVIEW for ARM guru and bug destroyer"I have another solution, the EOF works with this one.
the cnt is the bytes that are not read yet, so the first time it tries to read (and allocate 4 MB).
you only want to say that if it's in line mode and cnt > 256 (BUFINCR) cnt = BUFINCR
the next time cnt is the value of the bytes that are not read yet, so the old value minus the line (until CR LF) or if cnt (256) is reached.
with this solution the program does not try to allocate the whole file but for the max of 256.
in CCGByteStreamFileSupprt.c row 705
if(linemode && (cnt>BUFINCR)){
cnt = BUFINCR;
don't use the count input when using the vi in line mode. count does not make sense, cnt will be the total file size. also the output will be an array.
linemode seems to be the value of the file size but I checked this and it is just 0 or 1, so this is good
update: damn it doesn't work!
Wouter.
"LabVIEW for ARM guru and bug destroyer" -
Can I target the STM32 Primer2 hardware with LabVIEW for ARM
The STM32 Primer2 hardware looks very cool. Can LabVIEW for Arm target this hardware? From looking at the list of ARM devices supported by LabVIEW, this would appears to be a Tier 2 device (ARM Cortex-M3) with no support for TCP/IP or IO.
Can anyone tell me the feasibility or effort required to get TCP/IP, IO, and maybe even display support for this device?
Message Edited by Jim Kring on 09-11-2009 10:46 AMHave you ever said something you wish you could take back after having time to reflect upon it? Another forum I like, http://newsbusters.org lets the author edit his posts for a short time. Maybe NI could to that and I would not be pulling out my foot so often.
Well, perhaps I was a bit more "colorful" than I meant to be. Frustration does that to me sometimes. Still the idea of a strong rope covered with disgusting risks does get the point across magnificently. I just wish I had saved it for something more suitable.
Let me think back to some of the problems I've had in which I've lost hours trying to figure out...
1. Can't use the Wait ms function. It halts the program. Express wait works fine. It was sprinkled throughout which made it hard to isolate.
2. Some sub VIs don't run unless they are checked as inline code. I don't yet understand why.
3. At the beginning of my main vi there was a small cluster in which I filled the data from an SD card file. I used a constant of the cluster on the input of the Bundle function, but because my program and variable sizes were near the max I changed a number of variable representations to save memory. ...But I didn't replace the constant. The program started exhibiting really strange behaviors. I couldn't even get a simple state machine to run. I was reduced to commenting out (disable structure) sections to find the problem before noticing the coercion dot on the input to the bundle (The dot against the red string color doesn't stand out very strongly which is why I missed it). Apparently it overwrote memory since the older cluster was significantly larger than the new.
4. Spent a lot of time trying to get the SD card to work with SPI functions. Even though I read that 2009 supported SD card file services I didn't intuitively understand how to wire up since the Open/Create/Replace function has a ref num output which actually connects to the file(use dialog) input of the read and write functions.
5. Had a problem with breakpoints and probes not working. That apparently was caused by item #3.
6. Typo bug in the Arm_irq.c file LM3Sxxxx_GPIOCAHandlerP to LM3Sxxxx_GPIOCHandlerP
Some of these are of the rope variety. A few are actual bugs. All probably could have been solved in moments had I a local guru. Anyway, I've spent hours and my hands hurt. I hope to have this little project working on the LM3s8962 today and after some hardware changes will port it over to the Primer2... Hopefully...
This forum has been a real help... especially your quick responses.
regards to all,
David -
Accessing Onboard ADC with LabVIEW for ARM
I am working with the LM3S9062 Evaluation board and LabView for ARM system, and want to measure an analog voltage using the ADC, however I cannot determine which of the Digital Inputs is linked to the ADC. I need to know how the gpio mapping corresponds to the pinout of the Device. Any thoughts?
Do you mean the LM3s8962 evaluation board? If so, the pins should be labeled accordingly on the board - ADC0, ADC1, ADC2, etc.
Drop an EIO node with the same name as the pin and it should work fine from there.
Here are the schamtics : http://www.realview.com.cn/UploadFile/2008111510295067433.pdf -
Integrating C code into labview for ARM
Hello,
I wish to use the library functions written by Luminary engineers for their cortex-m3 controllers. If i wish to use these libraries written in C language in Labview, what i should do? There are large number of labraries are available in their websites. If any one has implemented these libraries in labview please write to me.
NabhirajI would also check the Using External Code in LabVIEW manual, found here
Bilal Durrani
NI
Bilal Durrani
NI -
Error ! ADC with LabVIEW for ARM
I cannot get the wave Amplitude and frequency? I don't know how to use ADC !
thanks!Do you mean the LM3s8962 evaluation board? If so, the pins should be labeled accordingly on the board - ADC0, ADC1, ADC2, etc.
Drop an EIO node with the same name as the pin and it should work fine from there.
Here are the schamtics : http://www.realview.com.cn/UploadFile/2008111510295067433.pdf -
How to use USB interface with LabVIEW Embedded for ARM
Hi everybody.
I am developing an application based on the "LabVIEW Embedded for
ARM". Now I am doing various tests using
the evaluation board 2300 (with NXP LPC2378), but soon I will
dedicate to program the micro used in my project (NXP
LPC2148).
During the tests, I have seen that "default" LabVIEW interface allows the use
of CAN, I2C and SPI interfaces of the micro. I want to know how can I also use the
USB interface that is on the micros -both LPC2148 and LPC2378- (pin USB_D + / D-, USB_UP_LED,
USB_CONNECT, VBUS).
Thanks in advance for your suggestions@chueco85
If you've created an application in LabVIEW for ARM and you build it.
you can go to tools >> ARM Module >> Show Keil uVision
then go to he build options.
the hex file will be created when you do a build.
with flash magic :http://www.flashmagictool.com/
you can program your device.
Wouter.
"LabVIEW for ARM guru and bug destroyer" -
LabVIEW for the STM32F100 or the STM32F4 ARMs
Hi, i was wanting to get started with LabVIEW for ARMs.
http://www.st.com/internet/evalboard/product/250863.jsp
and
http://www.st.com/internet/evalboard/product/252419.jsp
I wanted to know whether the above ARMs are supported are not, already looked at the RL-Libraries provided by kiel
http://www.keil.com/rl-arm/chips.asp
Since the STM32F100RB is listed,
http://www.keil.com/dd/chip/5086.htm
can i use LabVIEW ARM to directly code the board?
Thanks.
LabVIEW 8.2,8.6,2009...still learningThanks for the reply andrey. I haven't ordered it yet, wanted to be sure about the compatibility. How about the STM32F103RB?. Its listed in the kiel libraries too.
http://www.keil.com/dd/chip/4231.htm
Here is a guy who has worked with it. Seems like he got it working. The boards the same as well.
http://forums.ni.com/t5/LabVIEW-Embedded/labview-for-stm32f103-development-board/td-p/1022402/page/4
PS: Both have the same code memory, surprising to see the STM32F100 gives an error.
LabVIEW 8.2,8.6,2009...still learning -
Hi there,
A time ago I had made some code in LabVIEW for ARM.
when building the code for the target (lm3s8962, not important it doesn't depend on which target it is)
LabVIEW just closes (crash) when generating the C code. WITHOUT ANY POPUP OR SOMETHING.
(first reaction: huh, where's LabVIEW?)
after some investigation I managed to find at which point labview was closing. (looking in the application build folder). the generated source file was incomplete.
So I stripped the vi that was crashing the CcodeGen (C code generation module of LabVIEW for ARM), and so I have got a simple application that just crashes when I am trying to build it.
It is only when I select "Enable expression folding"
I am using LabVIEW for ARM 2010 on Windows 7.
Can somebody can reproduce it on his system?
I have attached the project to test it.
Can somebody (from NI) recover some crash information, and find the cause of this crash.
I find it really bad that LabVIEW just closes without any notice.
The error must be in the CCodeGen of LabVIEW.
Wouter.
"LabVIEW for ARM guru and bug destroyer"
Attachments:
Crash_test.7z 6 KBHello,
So if I understand correctly, then you also don't get a "Investigate Previous internal error" message when you restart LabVIEW?
Can you also check this folder "C:\Users\username\Documents\LabVIEW Data\lvfailurelog"
Please replace username by the actual username you're using when the crash occurs in LabVIEW.
Is this folder empty?
If you haven't changed the LabVIEW.ini file, then this error log should be produced.
Can you post your LabVIEW.ini file here?
It should be found in this location: "C:\Program Files (x86)\National Instruments\LabVIEW 2011"
Then I can take a look at it to see if certain things are enabled/disabled.
If it doesn't get produced, then you can also try the following steps:
http://digital.ni.com/public.nsf/allkb/4DFF0C6364BDBFA8862575F6005C3A48?OpenDocument
Kind Regards,
Thierry C - Applications Engineering Specialist Northern European Region - National Instruments
CLD, CTA
If someone helped you, let them know. Mark as solved and/or give a kudo. -
Programmin​g STM32 with LV for arm module?
just asking if someone have experience with this.
maybe you can give some tips?
regards,
Wouter.
Wouter.
"LabVIEW for ARM guru and bug destroyer"Almost 1,5 year later but,
I'm working now with the EK-LM3S8962.
you can programm the STM32 (primer) but you must be able to programm it with a keil debugger (JTAG)
de primer has a build in debugger (RLINK) and there's no RLINK plugin in KEIL uVision, yes i did try with DLL's
If I had time I would try it. But I am sure that it is possible
Wouter.
"LabVIEW for ARM guru and bug destroyer" -
Labview for stm32f103 development board?
hi,
good evening, i'm a student who's currently working on a thesis that involves the stm32f103 development board. our board uses a 32-Bit ARM Cortex-M3 Processor with a 128KB flash memory. it also has RS232 and USB ports for direct connection to the computer. i was just wondering if there are any labview products that are compatible with our board?Hi mat2_chan2,
You have a few options depending on what you mean by "compatible with our board." There are 2 options I see:
1) You can use LabVIEW to communicate with your evaluation board (through RS232 or USB). If you've already got your code working as you wish on the evaluation board, this would be the option for you.
2) You can use LabVIEW and the LabVIEW for ARM module to download actual LabVIEW code to the board itself. I tried to identify whether or not your chipset would be supported, but you didn't specify enough information. You can look here: RL-ARM Real-Time Library. (Chips for which the RL-ARM Real-Time Library exists can support LabVIEW code.) More information can be found at www.ni.com/arm. This method would require background work in order to port LabVIEW to your chip - integrating all of the chip's functionality into the LabVIEW environment. (If you're really tight on time, you need to take this into account.) See this link: Programming Additional ARM Microcontrollers with LabVIEW (without the LabVIEW Microprocessor SDK)
I hope this helps,
Kevin S.
Applications Engineer
National Instruments -
Did any body success to toggel Port0 and Port1 on MCB2300 board using LV for ARM?
I am trying to toggel the GPIO (Port0, Port1) on MCB2300 evaluation kit with LPC2378 uController on board using LV8.6. these two ports seems to dont have any programmable functionalities using LV. Ports 2, 3 and Port4 are working good. If any body got these two ports in working, so it will be great if you could post a functional LV or C code here in the forum.
I will be thankful for any suggestions or tips.
Greetings
Solved!
Go to Solution.Thank you very much Gmg for
this excellent answer.
This modification makes
also a +ve affect on the I2C port0.
Where I had/have also a problem to communicate
with a slave device using I2C. After this modification the I2C-CLK works, but I
still getting no communication to my slave device. I think the problem is now
how shall I use the I2C VIs shipped with LV for ARM embedded?
I have posted this question
here:
http://forums.ni.com/ni/board/message?board.id=170&message.id=370126&jump=true#M370126
so if you could answer me
PLZ post your answer there. -
Getting errors and LabView with ARM project won't compile
Hello there, I am currently turning to make a project run on a STM32f103C8 chip using LabView with ARM. I am currently trying to compile a ARM project but I have no been successful.
I have tried using the STM32F10x template uploaded by Joshua, and it tries to compile. At first I was getting the "stm32f10x_tim1.c" file missing error, but that was solved by downloading the file from firmware v1 and adding it to the includes folder. but now i am getting a new error saying "profile_timer.h" is missing.
I am using:
Windows 7
LabView 2010 evaluation
NI ARM module
and I am trying to compile a empty project
Here is the error code message, any hepl will be useful, thanks:
[12:39:37 PM] Status: Error
Build target 'LabVIEW'
compiling RTX_Config.c...
F:\National Instruments\LabVIEW 2010\CCodeGen\include\os\rtx\LVDefs_plat.h(17): error: #5: cannot open source input file "profile_timer.h": No such file or directory
compiling Retarget.c...
F:\National Instruments\LabVIEW 2010\CCodeGen\include\os\rtx\LVDefs_plat.h(17): error: #5: cannot open source input file "profile_timer.h": No such file or directory
compiling TargetInit.c...
F:\National Instruments\LabVIEW 2010\CCodeGen\include\os\rtx\LVDefs_plat.h(17): error: #5: cannot open source input file "profile_timer.h": No such file or directory
compiling ARM_Serial.c...
F:\National Instruments\LabVIEW 2010\CCodeGen\include\os\rtx\LVDefs_plat.h(17): error: #5: cannot open source input file "profile_timer.h": No such file or directory
compiling LVTree.c...
F:\National Instruments\LabVIEW 2010\CCodeGen\include\os\rtx\LVDefs_plat.h(17): error: #5: cannot open source input file "profile_timer.h": No such file or directory
compiling Pict.c...
F:\National Instruments\LabVIEW 2010\CCodeGen\include\os\rtx\LVDefs_plat.h(17): error: #5: cannot open source input file "profile_timer.h": No such file or directory
compiling arrresize.c...
F:\National Instruments\LabVIEW 2010\CCodeGen\analysis\development\include\platdefines.h(321): error: #35: #error directive:
Target not created
Status: Build failed.blank projects using other included boards seem to compile fine
and i have added a mock "profile_timer" to the keil library (just as a quick fix) and it seems to have stopped a lot of the errors, however i am still getting a few
these seem to be:
compiling CCGDatalogSupport.c...
F:\National Instruments\LabVIEW 2010\CCodeGen\libsrc\comms\CCGDatalogSupport.c(23): error: #5: cannot open source input file "CCGFileSupportPriv.h": No such file or directory
compiling CCGFileSupport.c...
F:\National Instruments\LabVIEW 2010\CCodeGen\libsrc\comms\CCGFileSupport.c(22): error: #5: cannot open source input file "CCGFileSupportPriv.h": No such file or directory
compiling CCGFileSupport2.c...
F:\National Instruments\LabVIEW 2010\CCodeGen\libsrc\comms\CCGFileSupport2.c(22): error: #5: cannot open source input file "CCGFileSupportPriv.h": No such file or directory
compiling CCGIrDASupport.c...
compiling CCGNetConnRefNum.c...
compiling CCGSerial.c...
compiling LVTree.c...
compiling Pict.c...
compiling arrresize.c...
F:\National Instruments\LabVIEW 2010\CCodeGen\analysis\development\include\platdefines.h(321): error: #35: #error directive:
Target not created
Status: Build failed.
i'll see if i can find a file for the ccgfilesupportpriv.h but the error directive worries me a bit -
LabView for More Complicated Setups
How is LabView for a complicated setup with 5 or 6 test instruments using
GPIB for instrument control. Automated tests required are software intensive
with power measurements, spectrum analyzer measurements, etc.
GaryWhat RF measurements did you setup. What is PXI. What is it about LabView
that is so great.
Gary
"Labviewguru" wrote in message
news:[email protected]..
> I wouldn't use anything BUT LabVIEW for this, and I have.
>
> I created an automated test setup to take several hundred measurements
> including all of the RF measurements, voltages, resistance, even Audio
> levels, and a host of others using ONLY a Laptop with LabVIEW, and
> several instruments communicating through a GPIB-USB converter.
>
> Of course, if I had to do it over again, I would have used PXI. -
LV Embedded with Keil toolchain for ARM 7 series
Hello,
has anybody use LV Embedded with Keil toolchain for ARM processors? We have this development tools in the company ( used by C group of programmers ) and I would like to hook LV Embedded to this toolchain. We also have Phytec phyCORE-LPC2294 development kit.
Any suggestions where to start?
Regards,
RompHi,
There is a way to hook LabVIEW into MicroVision. It has a TCP/IP interface called UVSock. I am attaching documentation on the interface to this message.
Michael P
National Instruments
Attachments:
UVSock.zip 19 KB
Maybe you are looking for
-
Clash of clans
-
Show in a Iview all documents of an user of the whole portal
Hello everybody, I want to show in an Iview all documents of an user of the whole portal, not only the documents under his folder /userhome/Personal Documents Any ideas? Thanks in advance Guillermo.
-
Thin driver / 8i / Solaris hangs for 60 seconds
I am having the same problem that I have also seen in these two messages: http://technet.oracle.com:89/ubb/Forum8/HTML/002149.html http://technet.oracle.com:89/ubb/Forum8/HTML/001335.html Using the thin driver to connect to Oracle 8.1.6 on Solaris 7,
-
How to compile ap_documents_payable.xdf
dear all, ap_documents_payable.xdf anyone know how to compile the ap_documents_payable.xdf file? in r12 application
-
How to upgrade from 10.5.x to mountain lion?
How can I go about upgrading my iMac which is currently running 10.5.8 to mountain lion? I realize that mountain lion requires 10.6.x or later, so I much therefore upgrade to 10.6.x or later first, and then download mountain lion from the app store?