Hi,

 

I am not familiar with atxmega128a3u  so I hope my input here will help and not 
confuse you.

 

I never had problems with UARTS but I did have problems with LwIP when 
interrupts priorities were 

not defined properly versus the FreeRTOS interrupt.

 

1.

Check that your interrupts are configured properly meaning the TCP stack cannot 
have a priority

higher than the FreeRTOS  !!

 

The following are my settings, these are for STM32F4xx a an M-Cortex micro

 

Check the following (if this applicable for your cpu):

/* The lowest interrupt priority that can be used in a call to a "set priority"

function. */

#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY                                 
               0xF

 

/* The highest interrupt priority that can be used by any interrupt service

routine that makes calls to interrupt safe FreeRTOS API functions.  DO NOT CALL

INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER

PRIORITY THAN THIS! (higher priorities are lower numeric values. */

#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY   5

 

/* Interrupt priorities used by the kernel port layer itself.  These are generic

to all Cortex-M ports, and do not rely on any particular library functions. */

#define configKERNEL_INTERRUPT_PRIORITY                    ( 
configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )

/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!

See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */

#define configMAX_SYSCALL_INTERRUPT_PRIORITY      ( 
configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )

 

 

#define ETH_ISR_PRIO           (configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY + 
5)

#define IR_TIMERS_ISR_PRIO     (configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY + 
2)

#define SERIAL_ISR_PRIO        (configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY + 
1)

 

2.

I have seen that your micro is 8 bit and has just 8KB of RAM ?... how much is 
for the OS and how much for LwIP ???

 

----------------------------------------------------------------------------------------------

 

I was able to run only FreeRTOS on a micro with just 10K ... how do you ran the 
OS and LwIP

With only 8K ???

 

 

BR,

Noam.

 

 

From: [email protected] 
[mailto:[email protected]] On Behalf Of unnamed
Sent: Tuesday, July 28, 2015 12:11 PM
To: [email protected]
Subject: Re: [lwip-users] freertos + lwip = no uart ?

 

about memory - i need more time to check that, .map file is confusing for me 
right now and i don't know how to check it and be 100% sure i'am right :) must 
read some tutorials first :)

for uart i tested like 3 approaches found on internet

1 interrupt based is from here
https://code.google.com/r/etiennebesancon-freertos-on-xmega/source/browse/Framework/drivers/usart_driver_RTOS.h?name=stdout_task_dev&r=4136176e4954a2af400fe042719c0fe5f65883f2

2 no interrupts, function names like in above examples, pretty unique i think 
usartBufferPutString(), PrintChar(), nothing like send()

3 right now i'am using printf() for every uart message (prinf linked to 
function PrintChar) no interrupts, so there are basicly 3 function
UsartBuffer * usartBufferInitialize(USART_t * usart, Baudrate_enum baudrate 
,char bufferSize)
static int PrintChar(char c, FILE *stream)
int uart_getchar(FILE *stream)

tested on 9600 and 115200 baud rate

lwip_debug is disabled in lwipopts.h

"?" is showing upon initializing function

without lwip files in makefile every approach works fine

 

 

 

2015-07-28 10:21 GMT+02:00 Grzegorz Niemirowski [via lwIP] <[hidden email]>:

Damian, could you provide a piece of code you use for accessing UART? Do you 
use functions named like send()? Maybe you have LWIP_COMPAT_SOCKETS defined and 
functions redefined?

#define send(a,b,c,d)Â Â Â Â Â Â Â Â  lwip_send(a,b,c,d)

 

Best regards,

Grzegorz Niemirowski

 

On Tue, Jul 28, 2015 at 10:06 AM, Damian Martyniuk <[hidden email] 
<http://user/SendEmail.jtp?type=node&node=24732&i=0> > wrote:

hi, hmm i don't see any messages about memory exceeding the resources available 
or  something like "memory could not be "Written"" - but i never looked at map 
file so i could be wrong (following this 
http://www.codeproject.com/Articles/3472/Finding-crash-information-using-the-MAP-file)
 - what should i be searching for ?

nothing seems wrong for my level of knowledge.

for me it's wierd that only uart is not working, freertos tasks are fine, 
application is working - the only thing is that i don't get messages to my 
terminal.

maybe i should buy external crystal ? i'am working on 32Mhz internal xmega 
clock right now.

 

2015-07-28 9:18 GMT+02:00 Adam Fullerton <[hidden email] 
<http://user/SendEmail.jtp?type=node&node=24732&i=1> >:

        Hi,
        
        Have you had a look at the linker map file? My guess is that the 
additional memory requirements has exceeded the resources available.
        
        Cheers,
        
        Adam.
        
        On 27/07/2015 07:33, unnamed wrote:

                hi, i'am trying to port FreeRTOS + lwip to atxmega128a3u and 
almost every
                thing is working fine, only my uart wont fire up when i compile 
my project
                with lwip files included, what can be the cause of this ? Any 
help would be
                appreciated.
                
                without lwip files uart is working great
                with lwip files i just get one character "?" upon uart init 
function and
                nothing else, tasks are still working fine.
                
                tried uart with and without interrupts
                
                lwip is not initialized in my project, only compiled
                
                i'am using
                microchip: atxmega128a3u on internal 32mhz clock
                freeRTOS 8.2
                lwip 1.4.1
                
                any help where should i search for erros ? right now i can't 
use my debugger
                becouse there is something wrong with amtel-ice+osx+avrdude so 
i'am stuck...
                
                
                
                --
                View this message in context: 
http://lwip.100.n7.nabble.com/freertos-lwip-no-uart-tp24724.html
                Sent from the lwip-users mailing list archive at Nabble.com.
                
                _______________________________________________
                lwip-users mailing list

                [hidden email] 
<http://user/SendEmail.jtp?type=node&node=24732&i=2> 
                https://lists.nongnu.org/mailman/listinfo/lwip-users

        
        
        _______________________________________________
        lwip-users mailing list
        [hidden email] <http://user/SendEmail.jtp?type=node&node=24732&i=3> 
        https://lists.nongnu.org/mailman/listinfo/lwip-users

 


_______________________________________________
lwip-users mailing list
[hidden email] <http://user/SendEmail.jtp?type=node&node=24732&i=4> 
https://lists.nongnu.org/mailman/listinfo/lwip-users

 


_______________________________________________ 
lwip-users mailing list 
[hidden email] <http://user/SendEmail.jtp?type=node&node=24732&i=5>  
https://lists.nongnu.org/mailman/listinfo/lwip-users 

________________________________

If you reply to this email, your message will be added to the discussion below:

http://lwip.100.n7.nabble.com/freertos-lwip-no-uart-tp24724p24732.html 

To unsubscribe from freertos + lwip = no uart ?, click here.
NAML 
<http://lwip.100.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
  

 

 

________________________________

View this message in context: Re: freertos + lwip = no uart ? 
<http://lwip.100.n7.nabble.com/freertos-lwip-no-uart-tp24724p24733.html> 
Sent from the lwip-users mailing list archive 
<http://lwip.100.n7.nabble.com/lwip-users-f3.html>  at Nabble.com.



************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer 
viruses.
************************************************************************************




************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer 
viruses.
************************************************************************************



_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to