MPLAB X V5.40

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi All,

I am novice in this forum. 

I bought PICKIT4 for my uC ATtiny85 and ATMEGA, but I have big problem with program load to uC.

When I want load program, I got this error message:

 

"Erasing...
Unexpected status code when executing setBaud, expected 0 but got -51 (SPI_STATUS_BAUD_INVALID) 
Programming did not complete."

 

My option is here:

AVR-GCC

MPLAB X V5.40

 

Communications: ISP and speed is 0 (zero)

I can not include new number of speed.

 

Where is problem? :(

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

SOLVED!

 

In the MPLAB X is a bug in speed column - when I write any numbers, so this column has red color, but it is not problem because, PICKIT4 load firmware to uC!

How is optimal speed of freqeuncy??? I wrote 0,01 MHz....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How is optimal speed of freqeuncy??? I wrote 0,01 MHz....

 For a Atmel ATMega168P running at 1MHz Microchip support told me this:

 

A valid communication (such as 0.125 MHz or 1/4 of the device clock speed) must be entered when selecting the ISP communication protocol.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm using IPE 5.4 (and also tried 5.1 which I had installed). Under 5.40,  I also get the same error -51 with the same message.

Furthermore, even if I try to change the SPI speed in the advanced settings, any other value than 0.00 will get flagged.  Clicking for more info tells me that the value must be between 0.000 and 0.000.  Neither read or write works.  I am using ATMega328P.

 

This smells like a bug, but there's relatively little discussion about this error (at least based on Google search).  Is the combo 5.4 IP + AVR ATMega working for anyone out there?

 

5.10 simply hangs at 'updating firmware application" when I try to connect.  I have to kill the IPE to get back control.

 

 

 

Bear with me.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

compuser wrote:

I'm using IPE 5.4 (and also tried 5.1 which I had installed). Under 5.40,  I also get the same error -51 with the same message.

Furthermore, even if I try to change the SPI speed in the advanced settings, any other value than 0.00 will get flagged.  Clicking for more info tells me that the value must be between 0.000 and 0.000.  Neither read or write works.  I am using ATMega328P.

 

This smells like a bug, but there's relatively little discussion about this error (at least based on Google search).  Is the combo 5.4 IP + AVR ATMega working for anyone out there?

 

5.10 simply hangs at 'updating firmware application" when I try to connect.  I have to kill the IPE to get back control.

 

 

Did you change the value to something like 0.125MHz and just ignore the error message?

 

I didn't use the IPE program yet, but the IDE works with a ATMega168p (the 328p is the same but with more RAM) with 5.40 and the Atmel-ICE in ISP mode

 

As I noted above, there is a bug is version 5.40 that causes this error message.

Here is what Microchip support told me:

 

Thank you for contacting Microchip Client Support team.

You're correct, a lot of our customers have been reporting the same issue with our new MPLAB X IDE version. My apologies for the inconvenience caused and thank you so much for your feedback.
 

The issue has been reported. Kindly try the below workarounds suggested by our internal team and let us know if it helps.

In v5.40 the default speed regressed to 0.0 MHz, which causes errors such as:
Unexpected status code when executing setBaud, expected 0 but got -51 (SPI_STATUS_BAUD_INVALID)

A valid communication (such as 0.125 MHz or 1/4 of the device clock speed) must be entered when selecting the ISP communication protocol.

"workaround" #1 - Create the project in v5.35 and then open and use in v5.40.
"workaround" #2 - manually edit the configurations.xml file in the project to have a valid speed like this:

<property key="communication.speed" value="0.125"/>

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the pointer.  I tried setting it to various values but I still got the same error message.

I can't seem to create an XML associated with the IPE, so I assume it has to do with the IDE.  I created an IDE project, edited the XML.

It looks like it got a little further.   Now I get "Encountered a problem during upload from target", so it's some other problem, but the XML edit from the IDE got past the baud rate problem.

 

Thanks again.

 

 

Bear with me.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well for some weird reason MPLAB X IPE 5.40 is not starting on my system, so I can only use MPLAB X IDE.

 

What you can try is install a previous version of MPLAB X IDE (found here: https://www.microchip.com/develo...) and try with that version.

version 5.35 should work fine, and you can have multiple versions installed side-by-side so it can exist next to the current version.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This might be veering off topic, but I also got into a situation where my IDE isn't launching-- I fund a Microchip page describing the process of deleting cache files.

 

I think this was it:

https://microchipdeveloper.com/mplabx:persistence-data

 

Bear with me.