mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-20 16:48:35 +01:00
[CTB] - Modified memory map address shift for the interface between FPGA and Blackfin SOM. Shift has to be set to 1 since the basic AMC data transfers is 8-bit and not 16-bit.
This commit is contained in:
7
slsDetectorSoftware/jctbDetectorServer/server_funcs.c
Executable file → Normal file
7
slsDetectorSoftware/jctbDetectorServer/server_funcs.c
Executable file → Normal file
@@ -7,8 +7,9 @@
|
||||
#include "slow_adc.h"
|
||||
#include "registers_m.h"
|
||||
#include "gitInfoMoench.h"
|
||||
#include "blackfin.h"
|
||||
|
||||
#define FIFO_DATA_REG_OFF 0x50<<11
|
||||
#define FIFO_DATA_REG_OFF 0x50 << MEM_MAP_SHIFT
|
||||
// Global variables
|
||||
|
||||
|
||||
@@ -866,7 +867,7 @@ int write_register(int file_des) {
|
||||
|
||||
|
||||
if(ret!=FAIL){
|
||||
address=(addr<<11);
|
||||
address=(addr << MEM_MAP_SHIFT);
|
||||
if((address==FIFO_DATA_REG_OFF)||(address==CONTROL_REG))
|
||||
ret = bus_w16(address,val);
|
||||
else
|
||||
@@ -932,7 +933,7 @@ int read_register(int file_des) {
|
||||
//#endif
|
||||
|
||||
if(ret!=FAIL){
|
||||
address=(addr<<11);
|
||||
address=(addr << MEM_MAP_SHIFT);
|
||||
if((address==FIFO_DATA_REG_OFF)||(address==CONTROL_REG))
|
||||
retval=bus_r16(address);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user