Hot!Harmony V2.06

Author
Shishi
Super Member
  • Total Posts : 370
  • Reward points : 0
  • Joined: 2016/06/15 05:34:10
  • Location: 0
  • Status: offline
2018/10/26 06:37:06 (permalink)
0

Harmony V2.06

Hi everyone
i am using harmony V2.06,using TCPIP with http for  wifi(spi2) and ethernet(spi1),uart(modbus RTU),RTCC,Flash memory and Eeprom with custom board.using PIC32MZ2048EFM144.system clock freq is 40MHZ.
i have 3 problems:
1. when i run the whole project and i want to see my live graph in web page, uart communication stops and not communicate anymore .if i go to another page uart start to communicate. this is my uart conf:

//8bit,no parity,1 stop
void InitUART1(void) {
U1MODEbits.UARTEN = 0; 
U1MODEbits.USIDL = 0; 
U1MODEbits.IREN = 0;
U1MODEbits.RTSMD = 0;
//U1MODEbits.notimplemented; 
U1MODEbits.UEN = 0; 
U1MODEbits.WAKE = 0;
U1MODEbits.LPBACK = 0; 
U1MODEbits.ABAUD = 0; 
U1MODEbits.BRGH = 0; 
U1MODEbits.RXINV = 0; 
U1MODEbits.PDSEL = 0; 
U1MODEbits.STSEL = 0; 
// (Fcy/(16*BAUDRATEG))-1; Fcy=20000000
U1BRG = 64; //baudrate=19200
// Load all values in for U1STA SFR
U1STAbits.UTXISEL1 = 0;
U1STAbits.UTXINV = 0; 
U1STAbits.UTXISEL0 = 0;
//U1STAbits.notimplemented = 0;
U1STAbits.UTXBRK = 0; 
U1STAbits.UTXEN = 0; 
U1STAbits.UTXBF = 0; 
U1STAbits.TRMT = 0; 
U1STAbits.URXISEL = 0;
U1STAbits.ADDEN = 0; 
U1STAbits.RIDLE = 0; 
U1STAbits.PERR = 0;
U1STAbits.FERR = 0; 
U1STAbits.OERR = 0; 
U1STAbits.URXDA = 0;
IPC28bits.U1RXIP = 3; 
IPC28bits.U1RXIS = 2;
IPC28bits.U1TXIP = 0; 
IFS3bits.U1TXIF = 0; 
IEC3bits.U1TXIE = 0;
IFS3bits.U1RXIF = 0; 
IEC3bits.U1RXIE = 1;
U1MODEbits.UARTEN = 1;
U1STAbits.UTXEN = 1;
U1STAbits.URXEN = 1;

}

 
2.second problem is independent of first problem that i mentioned above,it is: live data ,fore example random number in page index.htm,or in my case live graph, for some minutes do update and i can see the data,after that it stacks and does not update any more. the live data using newAJAXCommand(),that exist in webpage of microchip examples.
3.in my project i need to add a timer with 500ms interrupt.i configured it as can be seen blew,but after awhile  SYS_Tasks()
does not executed any more and i do not know why.

 
void init_Timer6(void) {
T6CON = 0x0; // Stop the timer and clear the control register,
// prescaler at 1:1,internal clock source
TMR6 = 0x0; // Clear the timer register
// (PR) = Period/(Prescale/ Fpb) fpb=40MHz/2
PR6 = 5000;//1000; // 100us
IPC7bits.T6IP = 7; // Set priority level = 3
IPC7bits.T6IS = 2; // Set subpriority level = 2
// Can be done in a single operation by assigning PC2SET = 0x0000000D
IFS0bits.T6IF = 0; // Clear the timer interrupt status flag
IEC0bits.T6IE = 1; // Enable timer interrupts
T6CON = 0x8010; // Start the timer,prescale2
 
}
 

it is my first time that i use harmony and i faced lots of strange problem that before i did not have.
post edited by Shishi - 2018/10/26 06:44:36
#1

2 Replies Related Threads

    Jim Nickerson
    User 452
    • Total Posts : 5842
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: offline
    Re: Harmony V2.06 2018/10/26 06:40:38 (permalink)
    0
    shirin87
     
    [cod]
    //8bit,no parity,1 stop

     
    [/cod]

    Your first use of the code tag is missing the e
    You got it right in the second usage, well done
    #2
    muellernick
    Super Member
    • Total Posts : 466
    • Reward points : 0
    • Joined: 2015/01/06 23:58:23
    • Location: Germany
    • Status: offline
    Re: Harmony V2.06 2018/10/29 02:12:03 (permalink)
    0
    This sounds like you stop calling your UART task.
     
    In my APP_Task, I keep calling the tasks I added (like UART) unconditionally. It is the tasks's responsibility to return without doing something (it is in the idle state then).
     
    Nick
    #3
    Jump to:
    © 2019 APG vNext Commercial Version 4.5