Giter Site home page Giter Site logo

Comments (8)

vishalnxt avatar vishalnxt commented on August 11, 2024

@khlee11 , Can you attach the MPLABX project for us to debug the issue?

from csp.

khlee11 avatar khlee11 commented on August 11, 2024

Attach the project file you requested.
It is simply a code that receives and returns the data sent from the host.
Uploading firmware_210215.zip…

from csp.

vishalnxt avatar vishalnxt commented on August 11, 2024

@khlee11 , thank you for the response, but I am not able to download the zip file you shared. It seems to be pointing back to the issue. Can you please check.
Meanwhile, did you try the UART Echo Blocking demo available here - uart_echo_blocking

from csp.

khlee11 avatar khlee11 commented on August 11, 2024

@ khlee11 님 , 응답 해 주셔서 감사합니다. 공유하신 zip 파일을 다운로드 할 수 없습니다. 문제를 다시 지적하는 것 같습니다. 확인해주세요.
한편, 여기에서 제공되는 UART Echo Blocking 데모를 사용해 보셨습니까-uart_echo_blocking

firmware_210215.zip

from csp.

vishalnxt avatar vishalnxt commented on August 11, 2024

@khlee11 , can you remove the printf calls and try out the below code :

`void uart_rx(void)
{
uint8_t data;

if(UART1_ReceiverIsReady() == true)
{
    if(UART1_ErrorGet() == UART_ERROR_NONE)
    {
        data = UART1_ReadByte();
        UART1_WriteByte(data);
    }
}

}

int main ( void )
{

/* Initialize all modules */
SYS_Initialize ( NULL );

while ( true )
{
    uart_rx();
}

/* Execution should not come here during normal operation */

return ( EXIT_FAILURE );

}
`

from csp.

khlee11 avatar khlee11 commented on August 11, 2024

I tried with the code you suggested.
However, the symptoms are the same.
It's a very simple operation, but I think I'm missing something simple.
Data is received only as deep as the FIFO.

from csp.

vishalnxt avatar vishalnxt commented on August 11, 2024

@khlee11 , are you still seeing this issue? I have uploaded a simple UART blocking demo, which we tested at 115200 baud rate and by typing characters on a UART console (Tera Term). Can you check if that works for you?

uart_echo_blocking_pic32mk_mcj_curiosity_pro.zip

Moreover, in the project that you shared, I notice that the STDIO in the project graph is not connected to any UART. You need to connect it to UART1. Also the UART pins seem to be configured incorrectly. The right UART pins for the PIC32MK MCJ Curiosity board are: U1RX:RG8, U1TX:RE0

Can you make these changes and see if that helps?

from csp.

khlee11 avatar khlee11 commented on August 11, 2024

Thanks for the answer.
I have identified the problem.
We confirmed this as a problem caused by CoreTimer_ Delay in the bootloader switch function.
FIFO overflow seems to occur when the delay function is performed.
When I removed the delay, it worked normally.
I did not connect UART to STDIO because I wrote custom code to selectively apply UART1 and UART2, so I did not connect.
Thanks again for the answer.

from csp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.