• Disclaimer: This Vendor's Forum is a paid-for commercial area. Unlike the rest of diyAudio, the Vendor has complete control of what may or may not be posted in this forum. If you wish to discuss technical matters outside the bounds of what is permitted by the Vendor, please use the non-commercial areas of diyAudio to do so.

DSD512 on Buffalo IIIse

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Member
Joined 2007
Paid Member
Alternative to reprogramming the on-board controller:
For those with a BBB/Hermes, the isolated I2C connection to BIII is an easy hookup. [Thanks for the foresight, Russ & Brian!] Scripts to reproduce the firmware/AVR are not difficult to produce and execute, and examples are available. One can then modify the es9018 setup on the fly depending on the program material or simply to experiment. If you don't fear the BBB command line, I2C might open avenues for easier testing. :)
 
Or for the stereo setup on BBB+Buffalo the am335x-boneblack-botic-sabre32.dtb can be used to enable I2C control of the ES9018. It disables the "SPDIF autodetect" everytime the I2S/DSD is being played. And re-enables is after stopping - so the external SPDIF works fine and automatically.
 
I will add the firmware update chip to the web site. There is something else we need to add anyway...
Thanks Brian. That will be quite convenient. I was just about to order a new B3SE kit but will wait until the chips come up. I assume that both for B3 and B3SE will be available.

Anyway, I've already built on-board-b3se.hex on my MacBook and am going out to buy tinyAVR this weekend.:)
 
Thanks Russ. I've turned off spdif autodetect and, fingers-crossed, so far after about 30mins of listening at 22MHz DSD I haven't experienced the static noise.

After turning off spdif autodetect I was enjoying DSD256 playback and I took my eye off PCM; tonight I tried PCM and all I got was a static noise, no music. I turned spdif autodetect back on and PCM is back to normal.

I guess I need to get that updated firmware chip first.
 
Something has to be amiss. :) The SPDIF auto-detect being disabled does not effect decoding PCM in the least. I suspect some confusion in the switch configuration.

In any case I definitely recommend using the new firmware - it is significantly better release.

Let's get the firmware upgraded first and take it from there. I've been looking for an updated firmware chip for the B3SE on the TPA website but can't see it?

Cheers
 
Anyway, I've already built on-board-b3se.hex on my MacBook and am going out to buy tinyAVR this weekend.:)

Last weekend, I prepared hex files to flash AVR chips for firmware update. These included the ones I downloaded from github and the other ones cross-compiled by myself via crosspack on Mac OS and via Ubuntu. Making hex files on each platform was uneventful and I suppose I could successfully flash the AVR chips using ArduinoISP (Vcc=5V).

However, it appears that none of them was correctly working because the volume control connected to ADC ceased to function after mounting these new AVR chips, either on B3SE or on B3.

What was worse, during rather frequent exchanges of the chips, I had injured and destroyed the soldered pad of IC socket on B3SE by careless handling, that became totally unusable. :eek:

So I'm now forced to use I2C for firmware control using miero's shell script (thanks miero, the script works well), connecting the isolated I2C header on the Hermes to B3SE as suggested by franclargo (thanks Frank for introducing this option, I'm enjoying this I2C control now).

After explicitly disabling SPDIF autodetect and enabling jitter reduction by the I2C script above, I noticed that the decrease of noise when playing DSD512 via BBB/Hermes/Cronus became so remarkable, compared to what I wrote previously.

Though I'm aware that this is not the right place, please allow me to show below the logs of hex compilation and AVR flash. I can not find anything wrong in them. Any suggestions will be appreciated.

Regards,

Code:
root@ubuntu:/var/tmp# export DEBIAN_FRONTEND=noninteractive
root@ubuntu:/var/tmp# git clone --depth=50 --branch=master [URL]https://github.com/russwyte/Buffalo-3-3SE-on-board-firmware.git[/URL]
Cloning into 'Buffalo-3-3SE-on-board-firmware'...
remote: Counting objects: 158, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 158 (delta 0), reused 0 (delta 0), pack-reused 156
Receiving objects: 100% (158/158), 79.46 KiB | 0 bytes/s, done.
Resolving deltas: 100% (94/94), done.
Checking connectivity... done.
root@ubuntu:/var/tmp# ls
Buffalo-3-3SE-on-board-firmware
root@ubuntu:/var/tmp# export CC=gcc
root@ubuntu:/var/tmp# gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

root@ubuntu:/var/tmp# sudo apt-get update -qq
root@ubuntu:/var/tmp# sudo apt-get install -qq gcc-avr binutils-avr avr-libc
root@ubuntu:/var/tmp/Buffalo-3-3SE-on-board-firmware# ls
Buffalo.c  LICENSE    Release-B3    USI_I2C_Master.c
Buffalo.h  README.md  Release-B3SE  USI_I2C_Master.h
root@ubuntu:/var/tmp/Buffalo-3-3SE-on-board-firmware# make -C ./Release-B3SE allmake: Entering directory `/var/tmp/Buffalo-3-3SE-on-board-firmware/Release-B3SE'
Building file: ../Buffalo.c
Invoking: AVR Compiler
avr-gcc -DF_CPU=8000000UL -Wall -Os -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -std=gnu99 -funsigned-char -funsigned-bitfields -mmcu=attiny85 -DF_CPU=8000000UL -MMD -MP -MF"Buffalo.d" -MT"Buffalo.o" -c -o "Buffalo.o" "../Buffalo.c"
Finished building: ../Buffalo.c
 
Building file: ../USI_I2C_Master.c
Invoking: AVR Compiler
avr-gcc -DF_CPU=8000000UL -Wall -Os -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -std=gnu99 -funsigned-char -funsigned-bitfields -mmcu=attiny85 -DF_CPU=8000000UL -MMD -MP -MF"USI_I2C_Master.d" -MT"USI_I2C_Master.o" -c -o "USI_I2C_Master.o" "../USI_I2C_Master.c"
Finished building: ../USI_I2C_Master.c
 
Building target: on-board-b3se.elf
Invoking: AVR C Linker
avr-gcc -Wl,-Map,on-board-b3se.map -mmcu=attiny85 -o "on-board-b3se.elf"  ./Buffalo.o ./USI_I2C_Master.o   
Finished building target: on-board-b3se.elf
 
Invoking: AVR Create Extended Listing
avr-objdump -h -S on-board-b3se.elf  >"on-board-b3se.lss"
Finished building: on-board-b3se.lss
 
Create eeprom image (ihex format)

Building file: ../USI_I2C_Master.c
Invoking: AVR Compiler
avr-gcc -DF_CPU=8000000UL -Wall -Os -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -std=gnu99 -funsigned-char -funsigned-bitfields -mmcu=attiny85 -DF_CPU=8000000UL -MMD -MP -MF"USI_I2C_Master.d" -MT"USI_I2C_Master.o" -c -o "USI_I2C_Master.o" "../USI_I2C_Master.c"
Finished building: ../USI_I2C_Master.c
Building target: on-board-b3se.elf
Invoking: AVR C Linker
avr-gcc -Wl,-Map,on-board-b3se.map -mmcu=attiny85 -o "on-board-b3se.elf"  ./Buffalo.o ./USI_I2C_Master.o   
Finished building target: on-board-b3se.elf
 
Invoking: AVR Create Extended Listing
avr-objdump -h -S on-board-b3se.elf  >"on-board-b3se.lss"
Finished building: on-board-b3se.lss
 
Create eeprom image (ihex format)
avr-objcopy -j .eeprom --no-change-warnings --change-section-lma .eeprom=0 -O ihex on-board-b3se.elf  "on-board-b3se.eep"
Finished building: on-board-b3se.eep
 
Create Flash image (ihex format)
avr-objcopy -R .eeprom -R .fuse -R .lock -R .signature -O ihex on-board-b3se.elf  "on-board-b3se.hex"
Finished building: on-board-b3se.hex
 
Invoking: Print Size
avr-size --format=avr --mcu=attiny85 on-board-b3se.elf
AVR Memory Usage
----------------
Device: attiny85

Program:    2404 bytes (29.3% Full)
(.text + .data + .bootloader)

Data:         49 bytes (9.6% Full)
(.data + .bss + .noinit)


Finished building: sizedummy
 
make: Leaving directory `/var/tmp/Buffalo-3-3SE-on-board-firmware/Release-B3SE'

root@ubuntu:/var/tmp/Buffalo-3-3SE-on-board-firmware/Release-B3SE# ls
Buffalo.d   on-board-b3se.eep  on-board-b3se.map  USI_I2C_Master.o
Buffalo.o   on-board-b3se.elf  sources.mk
makefile    on-board-b3se.hex  subdir.mk
objects.mk  on-board-b3se.lss  USI_I2C_Master.d
Code:
sh-3.2# avrdude -P /dev/tty.usbmodem1d1111 -b 19200 -c avrisp -p attiny85 -U flash:w:on-board-b3.hex

avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.06s

avrdude: Device signature = 0x1e930b
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: reading input file "on-board-b3.hex"
avrdude: input file on-board-b3.hex auto detected as Intel Hex
avrdude: writing flash (2596 bytes):

Writing | ################################################## | 100% 4.34s

avrdude: 2596 bytes of flash written
avrdude: verifying flash memory against on-board-b3.hex:
avrdude: load data flash data from input file on-board-b3.hex:
avrdude: input file on-board-b3.hex auto detected as Intel Hex
avrdude: input file on-board-b3.hex contains 2596 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 2.92s

avrdude: verifying ...
avrdude: 2596 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

sh-3.2# avrdude -P /dev/tty.usbmodem1d1111 -b 19200 -c avrisp -p attiny85 -U flash:w:on-board-b3se.hex

avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.06s

avrdude: Device signature = 0x1e930b
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: reading input file "on-board-b3se.hex"
avrdude: input file on-board-b3se.hex auto detected as Intel Hex
avrdude: writing flash (2624 bytes):

Writing | ################################################## | 100% 4.37s

avrdude: 2624 bytes of flash written
avrdude: verifying flash memory against on-board-b3se.hex:
avrdude: load data flash data from input file on-board-b3se.hex:
avrdude: input file on-board-b3se.hex auto detected as Intel Hex
avrdude: input file on-board-b3se.hex contains 2624 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 2.86s

avrdude: verifying ...
avrdude: 2624 bytes of flash verified

avrdude: safemode: Fuses OK
 
Your avrdude command did not specify the fuses. Here is my command line (using AVR Dragon):

Code:
avrdude -pt85 -cdragon_hvsp -Pusb -u -Uflash:w:"on-board-b3.hex":a -Ulfuse:w:0xd2:m -Uhfuse:w:0xcd:m -Uefuse:w:0xff:m

Thank you Brian for your kind instruction. I'll try again later with those fuse options after checking on the fuse calculator for ATtiny85.

Regards,
 
Thank you Brian for your kind instruction. I'll try again later with those fuse options after checking on the fuse calculator for ATtiny85.

Finally, I could flash the chip with firmware update for B3 and now it's working well. I realized that I'd failed to notice the README file by Russ on Github indicating those important fuse settings:

  • Low: 0xD2
  • High: 0xCD
  • Ext: 0xFF

Code:
sh-3.2# avrdude -P /dev/tty.usbmodem1d1121 -b 19200 -c avrisp -p attiny85 -U lfuse:w:0xd2:m -U hfuse:w:0xcd:m -U efuse:w:0xff:m -U flash:w:on-board-b3.hex

avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.06s

avrdude: Device signature = 0x1e930b
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: reading input file "0xd2"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.06s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xd2:
avrdude: load data lfuse data from input file 0xd2:
avrdude: input file 0xd2 contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.02s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude: reading input file "0xcd"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.06s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xcd:
avrdude: load data hfuse data from input file 0xcd:
avrdude: input file 0xcd contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.02s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xff"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xff:
avrdude: load data efuse data from input file 0xff:
avrdude: input file 0xff contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.02s

avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "on-board-b3.hex"
avrdude: input file on-board-b3.hex auto detected as Intel Hex
avrdude: writing flash (2596 bytes):

Writing | ################################################## | 100% 4.34s

avrdude: 2596 bytes of flash written
avrdude: verifying flash memory against on-board-b3.hex:
avrdude: load data flash data from input file on-board-b3.hex:
avrdude: input file on-board-b3.hex auto detected as Intel Hex
avrdude: input file on-board-b3.hex contains 2596 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 2.90s

avrdude: verifying ...
avrdude: 2596 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.
 
@twluke How are you liking the new firmware? :)
Hi Russ, I wanted to tell you many positive things after update. However, while checking the potency of DIP swithces, I noticed there was something wrong with this personally-built firmware. Playing PCM via the BBB/Hermes/Cronus was quite okay, providing clear sound stage and setting of DPLL bandwidth was also okay (currently set to lowest).

However, I noticed the B3 with this firmware could not play DSD and switching to SPDIF using a dual pole single throw switch did not work. Also, the response of volume control connected to ADC became slow and rather delayed

There may be still problems with compilation by avr-gcc or avr flash. For now, the old firmware is back to the B3 and I'm going to recheck the previous procedures for .hex making and AVR flashing including Arduino ISP.

Regards,
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.