Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - marcelo_

Pages: [1] 2
1
Hi Mark
Thank you for your answer. I was understanding that I could access locally an USB storage device.
Do you plan to add a USB host driver to the project?
Regards
Marcelo

Edited: But from the video, it seems to me that the pictures are taken from the SD card. Or that is a feature of the tower board?

2
Hi Mark
That was the problem: a too little stack. I followed your hints and all is working now.
Thank you again.
Best regards
Marcelo

PS Regarding the SDCARD_SUPPORT manifest, I commented it and the errors disappeared. But on another thread I asked you how to enable utFat on an USB device.

3
Hi Mark
It's me again, regarding debug messages I saw when connecting to telnet server ( "TIMEOUT!!!" and "No valid SD-card" )
I found that I had SDCARD_SUPPORT defined. After I commented it, the errors disappeared, obviusly.

What I want to ask is if that is the only manifest required to get FAT support, even if I will try a USB device, like a pen drive.

TIA

Regards
Marcelo

4
Hi Mark
Thank you.
The whole thing seems strange.
Beforehand, I must to tell that my application specific TCP/IP communication is done using fnSendBufTCP() to relieve my code from NACKs treatment. And I would like to get Telnet as a mean of debugging and logging.
I incremented again the heap size, this time to 28262 bytes.
When the board starts, and cannot connect with the server ( because it's down ) my readings are
Heap free: 7750 bytes
Stack unused: 0 bytes
After that, I can
1) Start the application server. When the connection is up and the board sends its first "handshake" frame, the values are
Heap free: 4906 byte
Stack unused: 0 bytes ( of course )
In this stage, if I try to connect the telnet server, the board resets ( under watchdog command, I suppose ).
2) Alternatively, on board reset with no app server up, I can connect the telnet server, and get the telnet menu.
Of course, the heap and stack figures are equal.
Once the telnet session is established, if I start my app server, when the board tries to send the handshake, again the watchdog detects an anomaly and resets the board.
After the first TCP buffer allocation, the heap is reduced by 2844 bytes, which matches sizeof(tcp-buffer), and remains 4906, which would suffice to allocate a second TCP buffer, but it's clear that it does not happens.
Could you give me a tip regarding this? I was diving the code to find a way to increment the stack size but at no luck.

Another strange thing is when the telnet connection is established. After the board sends the menu, a few seconds later two debugging messages starts to appear, one after the other, once and again:
TIMEOUT!!!
No valid SD-card
I traced both to mass_storage.c, but cannot find why the app is trying to access an SD card.

Thank you in advance, Mark.

Best regards

Marcelo





5
Hi Mark
Some weeks ago I asked you a related question. In these days, I could not establish a telnet connection to the board.
You adviced me to grow the heap, and I did it. Additionally, I limited the http sessions to one.
Now the connection is established ( as shown by Wireshark ), but nothing more happens: the client machine send the SYN, and the board answers SYN, ACK. But from that point nothing happens.
My heap is now 27 kb, from which some 4 kb are free; and I have 0 unused stack.
May be this stack depletion the reason the telnet server dont send the menu to the client?
Other TCP and IP funcionality is working OK: http, ftp, ping, and my own protocol.
Could you tell me what to do next?
TIA
Regards
Marcelo

6
NXPTM M522XX, KINETIS and i.MX RT / Re: Boot loader trouble
« on: September 21, 2010, 11:07:14 AM »
Hi!
I was struggling with the assembler modules, and found the culprit: it was a commented macro ( #define KIRIN3 ) in config.h line 54.
After that, the boot loader is working ok!
Thank you, Mark; overall, uTasker is a great job!
Regards
Marcelo

7
NXPTM M522XX, KINETIS and i.MX RT / Boot loader trouble
« on: September 17, 2010, 10:29:30 PM »
Hi Mark
I'm playing with the boot loader. I'm using uTasker 1.4, and compiling with CW 7.2 on a M52259DEMO board.
I followed all steps from the documentation, but it seems that the boot loader never pass control to the application.
I double checked that
1) The boot loader, when defined  _M5225X then #defines UTASKER_APP_START      0x1000 ( uTaskerBootLoader.c line 63 ) so
2) In the app project, the target M5225X_BM_ROM uses the M5225X_BOOT_APP_FLASH.lcf, and it has the following directives
MEMORY
{
    flash   (RX)   : ORIGIN = 0x00001000, LENGTH = 0x0003F000
   vectorram(RWX) : ORIGIN = 0x20000000, LENGTH = 0x00000400
   sram   (RWX)  : ORIGIN = 0x20000400, LENGTH = 0x00007C00       
   ipsbar  (RWX)  : ORIGIN = 0x40000000, LENGTH = 0x0
}

and is consistent with the boot loader #define
3) Also, I changed the uTaskerCombine command line in BM_Convert.bat so it takes into account the true address of the application.

After that, I flashed the bin combined result. It dont seems to work. The better test I have is to ping the board at its default IP address. Nothing happened.

Then, to try another way, I flashed at first the boot loader, then the application. This last step both ways: leaving the flash programmer alone, and telling it to "Restrict the address range" so it dont overwrite the boot loader.
All at no luck, the board never initializes the TCP stack.

Looking in uTaskerBootLoader.c for occurrences of UTASKER_APP_START, it seems that when defined _M5223X the macro is not acted upon, so no control transfer will occur.
How and where must be the code to control trasfer to happen?

TIA

Regards

Marcelo

8
Thank you again, Mark!

9
Hi Mark
It's me again.
You told me to set

PNQPAR &= ~(CLEAR_FUNCTION_Q_BIT_1 | CLEAR_FUNCTION_Q_BIT_3 | CLEAR_FUNCTION_Q_BIT_5 | CLEAR_FUNCTION_Q_BIT_7);
(or just the inputs inputs to be changed)

Alternatively the macro
_CLEAR_FUNCTION(NQ, (CLEAR_FUNCTION_Q_BIT_1 | CLEAR_FUNCTION_Q_BIT_3 | CLEAR_FUNCTION_Q_BIT_5 | CLEAR_FUNCTION_Q_BIT_7));
does the same.


I was seeking where to put that code but could not find the best place.
Would you be so kind and advice me where to put these lines?

TIA

Marcelo

10

Thank you very much, Mark

Marcelo


11
Hi Mark
Thank you.
Where and what could I change to disable the association between the NQ ports and the IRQ?
My proof of concept requires that any input port could be polled, simmetrically.
TIA
Marcelo

12
Hi Mark
I nearly completed my proof of concept ( RC, by now  8) )
All development was done in the simulator - great job !
Today I flashed it to M52259DEMO board; near all features are working as expected; the exceptions are
1) I'm testing input recognition using NQ port, bits 1 and 5, because they are wired to the board's switches. When in the simulator, I toggle any of them and the software can "read" the change. But when running in the board, it seems that the pushes on the switches are not recognized. What may be wrong, Mark?
2) I can ping the board, uploaded via ftp the html pages, and can connect with a browser, all exactly like in the simulator. But when trying to connect via telnet, after some little time the telnet client comes up with "Connection to host lost." message. Where  could I need to look?

TIA

Marcelo

13
µTasker general / Re: memory exception storing parameters in flash
« on: July 08, 2010, 11:03:35 PM »
Thank you, Mark.

Because I need lots of parameters, I did my own web pages.
In that pages, when the user clicks the submit button, he/she can also set a checkbox to "write to flash immediately" ( no need to go to Lan config page ).
When the checkbox arrives on, the switch case ( in fnHandleWeb() ) simply calls  fnSaveNewPars(SAVE_NEW_PARAMETERS_VALIDATE);

I can see that is wrong: when I change some parameter values from my own pages and then do the complete cycle thru "save changes" and "validate changes" in the Lan config page, all went OK.

So, I will delete the "write now" checkboxes and may be move the save/validate buttons ( the commands ) to the main menu page, with a new alert field regarging changes are pending.

14
µTasker general / memory exception storing parameters in flash
« on: July 08, 2010, 09:50:46 PM »
Hi Mark
I'm customizing the stored configuration parameters to my application's needs.
I extended the PARS structure/typedef with the necessary members, and also the webInterface logic to cope with them. All works fine, except when I do some changes and try to save the new parameter values, using the simulator.

The exception occurs at line 2395 of M5223X.c. The code there is as follows

   #ifdef _WINDOWS
    if (ulValue & ~(*(unsigned long*)ptrAdd)) {          // we check that we are not trying to program a bit from '0' to '1'
        *(unsigned char*)0 = 0;                                // this will fail so signal it when debugging
    }
    #endif

It's clear to me that the exception is intentional, because the application is trying to do an illegal operation. But the current demo code does not try to erase the flash prior to write the new conf, and I cannot find a suitable function to do that.
But the most intriguing thing is that I was playing some times with the conf before the customization attempt, without trouble.
Note: when I save the conf for the first time, all is OK, and checking the "flash file", it's as expected. The thing goes wrong when I try to save some new values, i.e, I'm trying to overwrite the flash. 

TIA
Regards
Marcelo


15
µTasker general / Re: How to read/write the digital I/O
« on: June 11, 2010, 04:30:16 PM »
Hi Mark
After some struggling with I/O interrupt awakening, I gave it up, because I take into account I need lots of digital inputs, so I'm turning to poll techniques.
But I cannot read them, or are doing the wrong thing.
At test stage, I are trying to "read" the NQ and DD ports. So, awakened by a timer, I'm showing in the telnet screen the PORTIN_SETNQ and PORTIN_SETDD values, which are allways 0xff, regardless of the state of the bits in the screen.
Also, I see that when changing some of the DD bits, it takes a lot of time to show the change at the screen.
Why may be the reason?
TIA, again.
Marcelo

Pages: [1] 2