Jump to content


New Member
  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About dvvrao

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi Orunmila, Thanks for the reply! I understood your analysis and suggestions. I will do the same and comeback with results.
  2. Today I tried the following: - Increased the number of buffers (from 1 to 10) to receive the data from UART Driver. UART Dynamic Driver - Buffer Queue Data Transfer Model with DMA. This driver code is generated by Harmony. - With this modification, I sent 5K Bytes in a burst. At the receiving end all the bytes are received correctly. - But, if I remove the call to function "USART_ReceiverOverrunErrorClear_Default()" then the receiving program stops after receiving few bytes. PFA the latest code file. Can anyone please look into the code to check what could be the problem? app.c
  3. Hi All, Did anyone get a chance too see my code? Thanks & Regards, Vishnuvardhan
  4. I created a support case at: https://microchipsupport.force.com/5001N00000q4HQW Case ID: 00401440.
  5. Today, I tried to debug the issue further. I found that there is Overrun Error. This error is present at lower baud rates like 9600 also. Due to this error, at the receiving end, few data bytes are received and then the UART does not receive data further. After using the API "USART_ReceiverOverrunErrorClear_Default()" the UART does not stop receiving data when Overrun Error occurs. But still received data is erroneous. So, at the transmission end added a delay of few milli seconds. With the addition of delay, no errors are seen. The receiving works at baud rate of 24Mbps also. Please suggest, the way to overcome/handle the overrun errors. PFA the latest code. The zip file contains 2 MPLAB X IDE projects in the form of packages. The transmit code is in the file "uarttransmit". This code continuously transmit a byte. Uses UART1. The receive code is in the file "uartreceive". This code continuously receives a byte. Uses UART1. And prints "Success" on UART2 is expected data byte is received, otherwise prints "Error" and the hex value of data byte received. code_9April2019.zip
  6. I am yet to analize the signal in scope, Meanwhile I did some experiemnetation. I sent one byte at a time, it is received properly at the other end, even at 24Mbps baud rate. But when I sent continous stream of bytes then there is problem even with baud rate of 9600. I am guessing there is problem with UART Device Driver that I use that comes with Harmony. I use "USART Dynamic Driver Library with Buffer Queue data transfer model with DMA. Please have a look here "http://microchipdeveloper.com/harmony:drv-usart-dynamic on "USART Dynamic Driver Library"
  7. Hi Orunmila, BRGH is a bit named "High Baud Rate Enable bit" in the register named "UARTx Mode Register". So it can have values either '0' or '1'. When PBCLK (Peripheral Bus Clock) is 48MHz and BRGH Bit is '1' then the formula for Baud Rate is " (FPB / (4 * (UxBRG + 1))) ". FPB = Frequenct Peripheral Bus, UxBRG = Baud Rate Register. So, we can get maximum baud rate when "UxBRG = 0" and the value will be: 48MHz/(4 * (0 + 1) = 48MHz/4 = 12Mbps. So, with PBCLK of 48 MHz the maximum Baud Rate of 12Mbps should be possible. At 12Mbps Baud Rate one PIC32MX Microcontroller is able to transmit but not able to receive. 1. I want to know if the problem is with configuring any registers? 2. Any problem with interfacing the 2 PIC32MX microcontrollers? Can I connect 2 UARTS on different micro-controller boards using jumper wires? Does the length of jumper wires matter? Is it advisable to to connect 2 UARTS at 3.3 level? Is USB power suppy sufficient to operate UART at this baud rate? By the way my hardware is: 1. PIC32 USB Starter Kit III (https://www.microchip.com/DevelopmentTools/ProductDetails/dm320003-3) 2. Starter Kit I/O Expansion Board (https://www.microchip.com/DevelopmentTools/ProductDetails/dm320002) I power the board using USB cable connecting to PC.
  8. I want to operate the UART of PIC32MX470512L with supported maximum data rate (Baud Rate). With MPLAB Harmony I could configure the PBCLK = 96 MHz (not in the attached project file). There is formula in the reference manual like below: Baud Rate = (FPB / (4 * (UxBRG + 1))); when bit BRGH = 1. FPB = Frequency Peripheral Bus => PBCLK = 96 MHz UxBRG = Baud Rate Register As per this formula the maximum supported Barate Rate would be 24MHz (FPB/4, when UxBRG = 0). Upto 8MHz the UART is able to receive data. I did not validate the received data. But after 8MHz the UART is able to send but not able to receive. So, I was asking if I need to do any other settings in Harmony to achieve the supported maximum baud rate??? As suggested by ORUNMILA I have to check for signal quality in Oscilloscope. I will do that and come back.
  9. Originally the problem is posted at: https://www.microchip.com/forums/m1092099.aspx#1092358 I could not upload the screenshots of the MHC Settings there in that forum due to file size limitations. So, I am using this forum. I am uploading files here and use this web link there... to point to attached files... Thanks for that! The question is: I am trying to operate the UART with higher baud rates. The PIC32 Micro controller used is PIC32MC470F512L. I use MPLAB Harmony. The UART is configured in loop back mode. I wrote a program to send and receive data. The program works well up to baud rate of 4915200 (approx 5Mbps). The same program does not work for baud rates greater than 4915200. I configured clock scheme such that the PBCLK is 96MHz. Please suggest, if i need to do some more settings using MPLAB Harmony Configurator. Due to file size limitation, I am unable to upload the "package" form of the MPLAB X Project. MHC_Settings.zip
  10. Hi Orunmila, Thanks for updating the info here. I forgot to do that..
  11. I had to create this post here to upload my code and mention the link on that forum. There i could not upload the code as it was exceeding the 500KB limit. When i get a solution for my problem in that forum i will update here.
  12. Does the simulator for PIC32MX470F512L support UART with DMA operation? I wrote a program that transmits a character using UART with DMA, but does not work. I used Dynamic USART driver with Buffer Que Data Transfer model using DMA. PFA the package file of the project. Please let me know if there is any thing wrong with the code or harmony configuration. usart_loopback.zip
  • Create New...