Cool stuff for Raspberry Pi, Arduino and all electronics hobby projects
Notifications
Clear all

[Solved / Archived] Witty Pi 4 L3V7 : Flash Firmware into the Board with B.O.D.

8 Posts
2 Users
0 Likes
221 Views
(@andrew-simpson17)
Posts: 79
Estimable Member Customer
Topic starter
 

Hi

Trying to flash frimware with B.O.D

Following this guide...

https://www.uugear.com/portfolio/compile-flash-firmware-for-witty-pi-4/#rtc_offset_value

I select the board:

Selected Board

I configure the settings:

Settings

I verify and compile:

Verify Compile

It produces these files:

Hex Files

I copy this file:

sketch_aug29a.ino.hex

over to my Rpi (been running things so far on Windows)

I rename it to: 

WittyPi4_L3V7.ino.hex

i verify my configuration:

Verify Configuration

I then flash it to the board:

Flash

I then try to run the setup. The witty board does not have the red light when all connected.

Then, I noticed you had pre-compiled hex files. So, I restored my board with the appropiate file. (every works again).

I then notice the the size of that pre-compiled file is 22kb compared to my own compiled one of 2kb.  So, 2 questions here:

  1. Is the pre-compiled hex set the B.O.D already?
  2. What am I doing wrong to get such a small hex file?

 

Thanks

 

 
Posted : 29/08/2024 9:41 am
(@admin)
Posts: 479
Member Admin
 

There are some mistakes in your Arduino IDE settings, also I am sure you were not compiling the correct source file. Because at the end of your compiling log, I can see:

Sketch uses 396 bytes (4%) of program storage space. Maximum is 8192 bytes.

Which is impossible, because the firmware should take 99% of program storage space, yet yours only takes 4%.

Unless you really want to make change in the firmware, we suggest to download the pre-compiled hex file. The link and way to download it is clearly mentioned in the tutorial you referred, as shown in screenshot below:

 

1724917985-download_hex.jpg
 
Posted : 29/08/2024 9:53 am
(@admin)
Posts: 479
Member Admin
 

Posted by: @andrew-simpson17

Is the pre-compiled hex set the B.O.D already?

Actually not. It is the command that flash the firmware into ATtiny841 does the job. To be specific, it is the fuse settings. In the tutorial you referred, you can find this:

This command also set the fuses (-Uefuse:w:0xF5:m -Uhfuse:w:0xDD:m -Ulfuse:w:0xE2:m) to turn on the B.O.D. (brown-out detection), to protect the data in MCU when input voltage is lower than 2.7V.

 
Posted : 29/08/2024 9:56 am
(@andrew-simpson17)
Posts: 79
Estimable Member Customer
Topic starter
 

@admin OK, well I need the BOD set. So that pre-compiled Hex file you supply will not help me?

 
Posted : 29/08/2024 12:21 pm
(@andrew-simpson17)
Posts: 79
Estimable Member Customer
Topic starter
 

"There are some mistakes in your Arduino IDE settings, also I am sure you were not compiling the correct source file. Because at the end of your compiling log, I can see:"

 

OK, well I took some time to post this question to you. As far as i can see I have followed the instructions. So, please tell me what I am doing wrong. In my commercial application I have to have this setting. I have 100 units of this board and more on the way. Please tell me what i am doing wrong apart from just telling me it is wrong somehow.

 

Also, I am not getting the email alerts to tel me you have replied.

 

Thanks

 
Posted : 29/08/2024 12:24 pm
(@admin)
Posts: 479
Member Admin
 

@andrew-simpson17 Have you read the tutorial you referred to? All information you needed has been provided in that tutorial. Just because you don't want to read it, or you don't understand it, doesn't mean I have to explain everything again and again, line by line to you.

Why don't you compare your settings against the picture in that tutorial

If you don't know which source file you are compiling, I am not here to teach you how to use Arduino IDE. There are tons of information on the Internet.

Does my previos answer makes no sense to you? You flash the firmware (no matter which version) with that command, which contains correct efuse settings, will turn on the B.O.D. Which part of the sentense don't you understand?

Stop emphasizing your application is commerical. Such kind of information is totally meaningless in this forum. 

 
Posted : 29/08/2024 12:40 pm
(@andrew-simpson17)
Posts: 79
Estimable Member Customer
Topic starter
 

"There are some mistakes in your Arduino IDE settings"

What are these mistakes?

I can see only 1 mistake and that was the clock source. i have corrected that. But that is not the main issue.

"I am sure you were not compiling the correct source file."

How can I check this? What do you actually mean the 'source file'? Do I have to download something else? Where is it located Where do I put it? I can only following your instructions you have given me.

"Which is impossible, because the firmware should take 99% of program storage space, yet yours only takes 4%."

So, what are the possible solutions please?

#

Thanks

 

 
Posted : 29/08/2024 12:41 pm
(@andrew-simpson17)
Posts: 79
Estimable Member Customer
Topic starter
 

@admin 

"Have you read the tutorial you referred to? All information you needed has been provided in that tutorial. Just because you don't want to read it, or you don't understand it, doesn't mean I have to explain everything again and again, line by line to you"

Yes, I am following it. I do want to read it. Why would you think otherwise?  How have you explained everything 'over and over again'?  This the 1st time I have asked you?

"Why don't you compare your settings against the picture in that tutorial? "

Yes I have been. It is only the clock setting that was wrong?  There is a different setting for using L3V7 for this though:

"Remarks: if you are compiling firmware (rev 6 or below) for Witty Pi 4 L3V7, the “mills()/micros()” option should be enabled, because Witty Pi 4 L3V7’s firmware (rev 6 or below) is still using the micros() function. For firmware rev 7 or above, the “mills()/micros()” option should be disabled as for other models."

 

" I am not here to teach you how to use Arduino IDE."

OK, fair enough.  I have never used it before and I thought everything I needed to know was in the context of the firmware was in those instructions. There is obviously more to it and I assume it relates to the source file.  If there are other things I need to know then fine. i will Google it. But half the battle is knowing what I need to know as 'a standard'.   

"Which part of the sentense don't you understand?"

Ah, yes, now I understand.  Sorry I am dyslexic. A million apologies.

"Stop emphasizing your application is commerical. Such kind of information is totally meaningless in this forum. "

Well then I got confused.  With other suppliers I have direct access their techinical support. I assumed this forum was UUGear's techincal support. I assumed you worked for UUGear?

This gives me a different context then. I was confused by your 'reactions' to my questions. I thought UUGear was not being very pleasant to me. I always try to be polite.  I now understand this is a 'standard' forum and not UUGear support 'hotline'. Again. Sorry. I must come across as brash to you then and slightly ungrateful. Can only apologise. I agree, mentioning this is for my commercial product will have no traction here.  I was trying to impress upon UUGear they have some obligation to me.  This forum does not. Understood.

 

😀

 

 
Posted : 29/08/2024 12:59 pm
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.