Program runs in UART Debug mode but does not run in Internal ROM mode in CW 6.3 for M52223EVB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Program runs in UART Debug mode but does not run in Internal ROM mode in CW 6.3 for M52223EVB

1,971 Views
kevy
Contributor I

Hello,

I've posted a similar qustion in this forum, but I did not get a helpfull answer so far, so I post my entire code hoping someone might be able to help me.

This program initializes M52223EVB board; configures a bluetooth module's baudrate, which is connected to UART0,
and connects it to a desired bluetooth receiver; then configures a gps module which is connected to UART1 and tries to send GPS's data through bluetooth module to the bluetooth receiver.

NOTE: I have changed WriteUARTN() and ReadUARTN(). But it does not effect this problem as I have tested this already.

Problem:
This process works perfectly in UART debug mode, which means I can see the GPS data on a terminal emulator that receives bluetooth receiver's input. but the terminal emulator does not show any data from GPS when I use Internal ROM mode and burn the compiled file into the flashROM.


Thank you,

P.S. As you might see, I'm using for-loops for delays....I tried to initialize DMA timers to use cpu_pause() function for delays, but I could not succeed. I would appreciate if someone help me to find an efficient delay system too.

 

main2.c

Message Edited by t.dowe on 2009-09-04 02:37 PM
Labels (1)
0 Kudos
Reply
3 Replies

934 Views
mjbcswitzerland
Specialist V
Kevy

If the program runs with one project configuration but not with another it is probably a difficulty with this configuration and not with the code itself (although it may be that the interrupt vertors have not been correctly set up when running from FLASH (?) - assuming you are using interrupts).

You could look at the uTasker project (it is completely free for non-commercial use - inlcuding support - and will allow you to realise a project like this with the uTakser simulator rather than having to work on the target). The UART interface will allow you to simply work in most modes you may want (DMA, flow-control, etc..). It will allow you to control the program flow much simpler with its OS support. You will also have no problems with configurations since the project is set up for all types.

Regards

Mark

www.uTasker.com



0 Kudos
Reply

934 Views
kevy
Contributor I
Mark,

Thank you for your comments. I downloaded and installed VS 6.0 and tried to run uTask Simulator; but it gave me bunch of errors, despite what uTask document says that it will compile without errors and warnings! I don't have enough time to work on fixing errors and learning how to use uTask simulator, and I don't think I would need it afterwards. So, I'd rather look for a solution that helps me fix Internal ROM issue.

Thank you,
0 Kudos
Reply

934 Views
mjbcswitzerland
Specialist V
Kevy

The uTasker + SP6 will compile without any warning in this environment. It will also compiler with Codewarrior and GCC and run in RAM or ROM mode on a target. If it doesn't compile, there must be an explanation for this. You are registered as a student user so you get full support to solve any problems - either direct email, on the uTasker foum or here. Therefore I think it is certainly easier to solve this because it will then allow you to do everything that you want - it includes the solutions to your present ROM problems too, allow simulating your work and also running it on the target.

At the moment I don't know what the exact problem is but I have tried the following.

1. I understand that you are using the M52223EVB (as I mentioned, the project is set up for the M5223X so needs a slight configuration change). In VisualStudio (and in CodeWarrior) you need to add the pre-processor define #_M5222X (in config.h the M52223EVB is already selected for this set up).
2. When I test the project with this setting there is a linking error because this is a USB based chip but we haven't released the USB support fo it yet. To solve this you can add the following define in config.h
#define DEVICE_WITHOUT_USB
This will remove all USB references. This then compiles for me. It also runs in the simulator.
3. The simulator doesn't actually display the M52223 chip (the package is not released yet for this type) but it can be corrected by adding the following bmps to the folder \Hardware\M5223X\GUI\
http://www.uTasker.com/software/V1.3/m522Xx.zip

We have M52223EVB and M52221DEMO boards here as reference so if you do experience any difficulties we are able to quickly sort this out.

Regards

Mark


0 Kudos
Reply