rudiratlos / rpi-hal

Free Pascal / Lazarus Hardware Abstraction Layer for Raspberry Pi Boards
MIT License
30 stars 13 forks source link

Support for RasPi 3B+ #1

Open kaimex opened 5 years ago

kaimex commented 5 years ago

Hi, Version 4.5 does not yet support the Raspberry Pi 3B+ with its CPU signature 0x00A020D3. A test on that version also reports errors wit SPI_Dev_Init. In the table/list of the PIN Header the columns for Signal and DIR are left empty. Could you provide a version with support for the RasPi 3B+ or tell how to do that ? Regards Kai

kaimex commented 5 years ago

In the meantime I found that the SPI_Dev_Init related errors were my own faults: SPI was not yet enabled in /boot/config.txt. After uncommenting #dtparam=spi=on they are gone. I could also avoid the error message that CPUs with signature A020D3 are unsupported by adding a line to the procedure Get_CPU_INFO_Init:

  $202082  : cpu_rev:=RPI_SetInfo(cpu_rev,'3B',4,1,2,47,40,1024);   // Pi3B (a02082 Sony, UK)
  $2020d3  : cpu_rev:=RPI_SetInfo(cpu_rev,'3B+',4,1,2,47,40,1024); // Pi3B+ (a020d3 Sony, UK) <--- new line
      else LOG_Writeln(LOG_ERROR,'Get_CPU_INFO_Init: (0x'+Hex(lw,8)+') unknown rev:'+cpu_rev+': RPI not supported'); 

I am, however, not sure, whether that's all to be done. Regards Kai

rudiratlos commented 5 years ago

it's supported by new version 5.0 just uploaded today