37#define NORETURN __attribute__((noreturn))
38#define SECTION(sec) __attribute__((section (sec)))
39#define ALIAS(fun) __attribute__((weak, alias(#fun)))
40#define ALIGNED(a) __attribute__ ((aligned(a)))
46#define BMP_VER_STR "2.1.2"
48#define BMP_VER_NUM 0x020102
50#define BMP_ID_STR "BC&MP/Spin5-BMP"
77 (LED_0 + LED_1 + LED_2 + LED_3 + LED_4 + LED_5 + LED_6 + LED_7)
157#define FLASH_BYTES 4096
158#define FLASH_WORDS 1024
187#define TAG_FIXED_SIZE 8
189#define TAG_POOL_SIZE 8
191#define FIRST_POOL_TAG TAG_FIXED_SIZE
193#define LAST_POOL_TAG (TAG_FIXED_SIZE + TAG_POOL_SIZE - 1)
195#define TAG_TABLE_SIZE (TAG_FIXED_SIZE + TAG_POOL_SIZE)
197#define SDPF_REPLY 0x80
223#define PORT_ETH (7 << PORT_SHIFT)
226#define SDP_BUF_SIZE 256
236typedef struct sdp_msg {
269#define IO_STD ((char *) 0)
271#define IO_DBG ((char *) 1)
273#define IO_LCD ((char *) 2)
275#define IO_NULL ((char *) 3)
281#define LCD_POS(x, y) (0x80 + (y) * 64 + (x))
285#define FL_DIR_SIZE 16
335 uint8_t warn_vlow[8];
336 uint8_t shut_vlow[8];
338 uint8_t warn_vhigh[8];
339 uint8_t shut_vhigh[8];
376typedef void (*
proc4) (uint32_t, uint32_t, uint32_t, uint32_t);
378typedef void (*
main_proc) (
void *, uint32_t, uint32_t, uint32_t);
451 uint32_t *stack_base;
452 uint32_t *stack_limit;
494typedef void (*
LPC_IAP) (uint32_t *cmd, uint32_t *res);
503static uint32_t *
const flash_buf = (uint32_t *) 0x10000000;
506#define UNI_VEC_SIZE 8
520static uint32_t *
const uni_vec = (uint32_t *) 0x10001000;
523#define DBG_VEC_SIZE 16
544static uint32_t *
const dbg_vec = (uint32_t *) 0x10001020;
582void heap_init (
char *base,
char *top);
583void *bmp_malloc (uint32_t size);
593uint32_t
i2c_poll (LPC_I2C_TypeDef *restrict i2c, uint32_t ctrl);
595uint32_t
i2c_receive (LPC_I2C_TypeDef *restrict i2c, uint32_t ctrl,
596 uint32_t addr, uint32_t length,
void *buf);
598uint32_t
i2c_send (LPC_I2C_TypeDef *restrict i2c, uint32_t ctrl,
599 uint32_t addr, uint32_t length,
const void *buf);
601int16_t
read_ts (LPC_I2C_TypeDef *restrict i2c, uint32_t addr);
603uint32_t
read_ee (uint32_t addr, uint32_t count,
void *buf);
605uint32_t
write_ee (uint32_t addr, uint32_t count,
const void *buf);
616void clock_div (uint32_t bit_pos, uint32_t value);
643void die(uint32_t code) NORETURN;
651uint32_t
is_blank (
const void *buf, uint32_t len);
653uint32_t
flash_write (uint32_t addr, uint32_t length,
const uint32_t *buffer);
654uint32_t
flash_erase (uint32_t start, uint32_t end);
670void proc_power (uint32_t arg1, uint32_t arg2);
671void proc_reset (uint32_t arg1, uint32_t arg2);
672void proc_led (uint32_t arg1, uint32_t arg2);
684void copy_ip (
const uint8_t *restrict f, uint8_t *restrict t);
720void can_proc_cmd (uint32_t dest, uint32_t op, uint32_t arg1, uint32_t arg2);
727uint32_t
crc32 (
void *buf, uint32_t len, uint32_t crc);
728uint32_t
crc32_chk (
void *buf, uint32_t len);
736void io_printf (
char *stream,
char *f, ...);
748void ssp0_read (uint32_t cmd, uint32_t addr, uint32_t len, uint8_t *buf);
749void ssp0_write (uint32_t cmd, uint32_t addr, uint32_t len,
const uint8_t *buf);
750void ssp0_copy (uint32_t addr, uint32_t len);
752void ssp1_copy (uint32_t count,
const uint8_t *buf);
754void sf_read (uint32_t addr, uint32_t len, uint8_t *buf);
755void sf_write (uint32_t addr, uint32_t len,
const uint8_t *buf);
756uint32_t
sf_crc32 (uint32_t addr, uint32_t len);
758void fpga_word (uint32_t addr, uint32_t fpga, uint32_t *buf, uint32_t dir);
763enum bmp_power_status_commands {
791extern uint32_t up_time;
800extern const uint32_t
hw_ver;
#define SDP_BUF_SIZE
Size of user data area of SDP message.
Definition bmp.h:226
void proc_power(uint32_t arg1, uint32_t arg2)
Control power for this board; calls set_power() (and sf_scan() and reset_spin() if powering on)
Definition bmp_cmd.c:444
uint16_t dest_addr
SDP destination address.
Definition bmp.h:247
void ssp0_copy(uint32_t addr, uint32_t len)
Copy from Serial Flash on SSP0 to FPGA(s) on SSP1.
Definition bmp_ssp.c:249
bmp_iptag_flags
Flags on IPTags.
Definition bmp.h:177
@ IPTAG_ARP
Awaiting ARP resolution.
Definition bmp.h:180
@ IPTAG_VALID
Entry is valid.
Definition bmp.h:178
@ IPTAG_TRANS
Entry is transient.
Definition bmp.h:179
bmp_proc_opcodes
Commands that can be invoked over CAN.
Definition bmp.h:476
@ PROC_LED
proc_led()
Definition bmp.h:479
@ PROC_POWER
proc_power()
Definition bmp.h:478
@ PROC_RESET
proc_reset()
Definition bmp.h:477
void sf_read(uint32_t addr, uint32_t len, uint8_t *buf)
Read from flash.
Definition bmp_ssp.c:317
void eth_rx_discard(void)
Discard received packet, releasing buffer for reuse.
Definition bmp_eth.c:108
sdp_msg_t * msg_queue_remove(void)
Get a message from the head of the message queue and remove it from the queue.
Definition bmp_net.c:270
void sf_write(uint32_t addr, uint32_t len, const uint8_t *buf)
Write to flash.
Definition bmp_ssp.c:287
uint8_t tag
SDP IPtag.
Definition bmp.h:244
uint32_t * stack_top
Stack top.
Definition bmp.h:457
void(* event_proc)(uint32_t, uint32_t)
The type of an event handler.
Definition bmp.h:551
uint32_t mod_date
4: Date written
Definition bmp.h:317
void can_timer(void)
This is called every 10ms on all boards.
Definition bmp_can.c:763
uint16_t udp_port
UDP port.
Definition bmp.h:362
uint32_t crc32(void *buf, uint32_t len, uint32_t crc)
Compute CRC32 for a buffer of given length.
Definition bmp_crc.c:88
uint32_t sf_crc32(uint32_t addr, uint32_t len)
Compute CRC of data on flash.
Definition bmp_ssp.c:326
bool lcd_active
Whether the LCD is active; if not, nothing should be sent to the LCD.
Definition bmp_i2c.c:49
void read_fans(void)
Count transitions on the fan sensor inputs.
Definition bmp_hw.c:884
uint32_t arg3
Arg 3.
Definition bmp.h:256
cortex_vec_t * cortex_vec
Cortex boot vector.
Definition bmp_main.c:55
void read_adc(void)
Read voltage from an ADC (directly into board_stat_t::adc) and start the read of the next ADC.
Definition bmp_hw.c:475
uint16_t port
UDP port of target.
Definition bmp.h:203
uint32_t flash_write(uint32_t addr, uint32_t length, const uint32_t *buffer)
Write to flash from supplied buffer. Only writes one sector.
Definition bmp_flash.c:114
uint32_t boot_sec
Boot block number.
Definition bmp_main.c:54
uint16_t timeout
Timeout (in 10ms ticks)
Definition bmp.h:204
uint32_t is_blank(const void *buf, uint32_t len)
Check if an area of memory is blank (filled with 0xFF)
Definition bmp_flash.c:48
uint32_t i2c_poll(LPC_I2C_TypeDef *restrict i2c, uint32_t ctrl)
Poll an I2C port.
Definition bmp_i2c.c:87
void(* handler)(void)
Type of an interrupt handler.
Definition bmp.h:374
void configure_i2c(void)
Set up I2C0 and I2C2 - 25MHz PCLK.
Definition bmp_i2c.c:59
iptag_t tag_table[]
The table of IPTags.
Definition bmp_net.c:166
proc4 flash_copy
Flash copy.
Definition bmp.h:459
void event_set_byte(uint32_t addr, uint32_t data)
Set a byte at an address.
Definition bmp_event.c:54
void copy_ip_data(void)
Copy IP address data from Flash (bmp_flash_ip and spin_flash_ip)
Definition bmp_net.c:879
uint32_t flash_sector(uint32_t addr)
Convert flash address to sector number (LPC17xx specific)
Definition bmp_flash.c:67
uint8_t board_ID
Board ID (devived from can_ID)
Definition bmp_hw.c:254
static ip_data_t *const bmp_flash_ip
Address in Flash of BMP IP address.
Definition bmp.h:487
uint16_t checksum
checksum (if used)
Definition bmp.h:239
void arp_lookup(iptag_t *iptag)
Request an ARP lookup.
Definition bmp_net.c:812
static ip_data_t *const spin_flash_ip
Address in Flash of SpiNNaker base IP address.
Definition bmp.h:489
bmp_fl_dir_type
Values in fl_dir->type.
Definition bmp.h:288
uint32_t fpga_init(uint32_t mask)
Initialise FPGAs.
Definition bmp_hw.c:396
uint32_t build_date
Build date.
Definition bmp.h:462
static uint32_t *const uni_vec
32 byte (8 word) uninitialised vector
Definition bmp.h:520
void reset_spin(uint32_t code)
Resets SpiNNaker by raising/lowering POR and switching the Serial Flash multiplexer as needed when PO...
Definition bmp_hw.c:824
void ssp0_pins(uint32_t on)
Set up GPIO pins that talk to Flash.
Definition bmp_hw.c:684
uint32_t read_ee(uint32_t addr, uint32_t count, void *buf)
Read from EEPROM.
Definition bmp_i2c.c:234
uint32_t CRC32
252: CRC
Definition bmp.h:342
void iptag_timer(void)
IPTag timeout tick. Called from proc_100hz() every 10ms.
Definition bmp_net.c:355
uint32_t i2c_receive(LPC_I2C_TypeDef *restrict i2c, uint32_t ctrl, uint32_t addr, uint32_t length, void *buf)
Receive a buffer over I2C.
Definition bmp_i2c.c:164
uint32_t count
Count of messages sent via IPTag.
Definition bmp.h:206
uint32_t arg1
First arg to proc.
Definition bmp.h:558
uint8_t marker
0: == 0x96
Definition bmp.h:312
ip_data_t bmp_ip
Our own IP address.
Definition bmp_net.c:188
uint16_t length
length
Definition bmp.h:238
void led_set(uint32_t leds)
Control the LEDs.
Definition bmp_hw.c:350
uint32_t sw_ver
Software version.
Definition bmp.h:463
#define CAN_SIZE
Number of boards that can be managed over the CAN bus.
Definition bmp.h:780
void delay_ms(uint32_t n)
Delay using a busy loop.
Definition bmp_hw.c:978
uint16_t flags
Miscellaneous flags.
Definition bmp.h:357
void proc_queue_add(event_t *e)
Adds an event to a list of events which can (all) be executed at some later time.
Definition bmp_event.c:83
bmp_led_code
Encoding of LED control bits.
Definition bmp.h:64
@ LED_2
Red.
Definition bmp.h:67
@ LED_1
Orange.
Definition bmp.h:66
@ LED_3
Green.
Definition bmp.h:68
@ LED_0
Green.
Definition bmp.h:65
@ LED_5
Green.
Definition bmp.h:70
@ LED_7
Red.
Definition bmp.h:72
@ LED_4
Green.
Definition bmp.h:69
@ LED_6
Green.
Definition bmp.h:71
board_stat_t board_stat[CAN_SIZE]
Board status.
Definition bmp_hw.c:248
bool data_ok
Data sector CRC OK.
Definition bmp_main.c:53
bmp_gpio_bits
Miscellaneous GPIO bits.
Definition bmp.h:80
@ XFSEL_2
Port 4.
Definition bmp.h:85
@ XFSEL_1
Port 3.
Definition bmp.h:84
@ XFSEL_0
Port 3.
Definition bmp.h:83
event_t * next
Next in Q or NULL.
Definition bmp.h:562
bmp_return_code
SDP return codes.
Definition bmp.h:143
@ RC_CMD
Bad/invalid command.
Definition bmp.h:147
@ RC_TIMEOUT
Timeout.
Definition bmp.h:150
@ RC_ARG
Invalid arguments.
Definition bmp.h:148
@ RC_ROUTE
No P2P route.
Definition bmp.h:151
@ RC_SUM
Bad checksum.
Definition bmp.h:146
@ RC_CPU
Bad CPU number.
Definition bmp.h:152
@ RC_OK
Command completed OK.
Definition bmp.h:144
@ RC_PORT
Bad port number.
Definition bmp.h:149
@ RC_LEN
Bad packet length.
Definition bmp.h:145
uint32_t can_send_msg(uint32_t dest, sdp_msg_t *msg)
Send an SDP message over the CAN.
Definition bmp_can.c:370
uint8_t frame_ID
3: Frame Identifier
Definition bmp.h:315
const uint8_t * can2board
Mapping from CAN ID to board number.
Definition bmp_hw.c:266
void copy_ip(const uint8_t *restrict f, uint8_t *restrict t)
Copy IP address.
Definition bmp_net.c:331
uint8_t flags
SDP flag byte.
Definition bmp.h:243
uint8_t LCD_time
15: Time (secs) for initial display
Definition bmp.h:322
void fpga_reset(uint32_t code)
Reset the FPGAs.
Definition bmp_hw.c:378
void flash_buf_init(void)
Initialise flash_buf.
Definition bmp_cmd.c:117
void cpu_int_restore(uint32_t cpsr)
Restore interrupts.
Definition bmp_hw.c:288
uint32_t msg_queue_insert(sdp_msg_t *msg)
Insert a message in the message queue.
Definition bmp_net.c:246
void configure_lcd(void)
Configure the LCD.
Definition bmp_i2c.c:281
uint32_t checksum
Checksum.
Definition bmp.h:464
void read_temp(void)
Read I2C temperature sensors and also compute the fan speed.
Definition bmp_hw.c:910
void eth_copy_rxbuf(uint32_t *buffer, uint32_t length)
Copy received message into supplied buffer.
Definition bmp_eth.c:137
uint8_t can_ID
CAN ID (from backplane)
Definition bmp_hw.c:253
void crc32_buf(void *buf, uint32_t len)
Compute and insert CRC32 of a buffer where the CRC is placed in the last 4 bytes.
Definition bmp_crc.c:119
uint8_t power_state
Power supply state.
Definition bmp_hw.c:258
uint32_t debug(sdp_msg_t *)
SDP message dispatcher.
Definition bmp_cmd.c:824
uint32_t msg_queue_size(void)
How big is the message queue?
Definition bmp_net.c:284
uint32_t iptag_new(void)
Allocate a transient IPTag.
Definition bmp_net.c:372
static LPC_IAP const lpc_iap
LPC17xx In Application Programming entry point.
Definition bmp.h:498
void event_init(uint32_t priority)
Initialise the event processing system.
Definition bmp_event.c:62
bmp_commands
Commands supported by the BMP.
Definition bmp.h:104
@ CMD_FLASH_WRITE
Write Flash.
Definition bmp.h:120
@ CMD_FLASH_ERASE
Erase Flash.
Definition bmp.h:119
@ CMD_BMP_EE
Access EEPROM.
Definition bmp.h:123
@ CMD_FPGA_READ
Read FPGA memory.
Definition bmp.h:111
@ CMD_LED
Control LEDs.
Definition bmp.h:114
@ CMD_READ
Read memory.
Definition bmp.h:107
@ CMD_POWER
Control board power.
Definition bmp.h:126
@ CMD_RUN
Run.
Definition bmp.h:106
@ CMD_VER
Get BMP version.
Definition bmp.h:105
@ CMD_XILINX
Access XILINX.
Definition bmp.h:125
@ CMD_WRITE
Write memory.
Definition bmp.h:108
@ CMD_FLASH_COPY
Copy Flash.
Definition bmp.h:118
@ CMD_FPGA_WRITE
Write FPGA memory.
Definition bmp.h:112
@ CMD_BMP_SF
Access Boot Flash.
Definition bmp.h:122
@ CMD_BMP_INFO
Get BMP information.
Definition bmp.h:117
@ CMD_BMP_PWM
Configure PWM.
Definition bmp.h:129
@ CMD_FILL
Fill memory.
Definition bmp.h:109
@ CMD_BMP_I2C
Access I2C bus.
Definition bmp.h:128
@ CMD_IPTAG
Control IPTags.
Definition bmp.h:115
@ CMD_RESET
Reset boards.
Definition bmp.h:124
@ CMD_TUBE
tubotron: outbound message
Definition bmp.h:132
uint32_t crc32_chk(void *buf, uint32_t len)
Compute the CRC of a buffer.
Definition bmp_crc.c:103
uint32_t arg2
Second arg to proc.
Definition bmp.h:559
uint8_t sw_ver
1: EE Data format version
Definition bmp.h:313
int16_t read_ts(LPC_I2C_TypeDef *restrict i2c, uint32_t addr)
Read temperature sensor.
Definition bmp_i2c.c:217
void msg_init(void)
Initialise the message queue.
Definition bmp_net.c:195
uint32_t warning
Warning flags.
Definition bmp.h:351
ee_data_t ee_data
Copy of EEPROM data.
Definition bmp_hw.c:260
bmp_iptag_commands
Subcommands for manipulating IPTags.
Definition bmp.h:165
@ IPTAG_TTO
Set IPTag timeout (common)
Definition bmp.h:170
@ IPTAG_SET
Configure existing IPTag.
Definition bmp.h:167
@ IPTAG_NEW
Allocate and configure IPTag.
Definition bmp.h:166
@ IPTAG_GET
Read IPTag status.
Definition bmp.h:168
@ IPTAG_CLR
Deallocate all IPTags.
Definition bmp.h:169
bmp_fpga_command
Directions for fpga_word()
Definition bmp.h:94
@ FPGA_READ
Read from FPGA.
Definition bmp.h:95
@ FPGA_WRITE
Write to FPGA.
Definition bmp.h:96
uint32_t eth_tx_rdy(void)
Is the ethernet hardware ready to transmit?
Definition bmp_eth.c:90
void proc_reset(uint32_t arg1, uint32_t arg2)
Board reset handler; calls reset_spin()
Definition bmp_cmd.c:401
void event_cancel(event_t *e, uint32_t ID)
Cancel an event that was previously scheduled.
Definition bmp_event.c:195
uint8_t dest_port
SDP destination port/CPU.
Definition bmp.h:245
void configure_ssp(void)
Configure SSP (serial flash, FPGAs)
Definition bmp_ssp.c:371
const uint8_t * board2can
Mapping from board number to CAN ID.
Definition bmp_hw.c:268
bmp_type_code
Data transfer unit.
Definition bmp.h:136
@ TYPE_BYTE
Transfer by bytes.
Definition bmp.h:137
@ TYPE_HALF
Transfer by half-words.
Definition bmp.h:138
@ TYPE_WORD
Transfer by words.
Definition bmp.h:139
uint32_t ID
Unique ID for active event (0 if inactive)
Definition bmp.h:561
void ssp0_read(uint32_t cmd, uint32_t addr, uint32_t len, uint8_t *buf)
Read buffer from Serial Flash.
Definition bmp_ssp.c:210
void eth_receive(void)
Receive a packet off the ethernet hardware.
Definition bmp_net.c:636
static uint32_t *const flash_buf
4096 byte buffer used for writing to Flash and as a general purpose buffer
Definition bmp.h:503
void lcd_putc(uint32_t c)
Write a character to the LCD. Buffers.
Definition bmp_i2c.c:310
uint8_t hw_ver
2: Backplane HW version (0..7)
Definition bmp.h:314
void proc_queue_run(void)
Execute a list of events (in the order in which they were added to the list).
Definition bmp_event.c:102
void configure_hw(void)
Configure the BMP hardware.
Definition bmp_hw.c:1188
void route_msg(sdp_msg_t *msg)
Route a message to its destination.
Definition bmp_net.c:782
uint8_t mask_bits
13: IP mask bits (0..31)
Definition bmp.h:320
void ssp1_slow(void)
Configure SSP1 to be slow.
Definition bmp_ssp.c:349
void eth_copy_txbuf(uint32_t *buffer, uint32_t length)
Copy supplied buffer into transmit hardware.
Definition bmp_eth.c:122
bool bp_ctrl
Backplane controller.
Definition bmp_hw.c:255
uint32_t write_ee(uint32_t addr, uint32_t count, const void *buf)
Write to EEPROM.
Definition bmp_i2c.c:252
uint32_t eth_rx_size(void)
Get size of received data.
Definition bmp_eth.c:149
void ssp1_fast(void)
Configure SSP1 to be fast.
Definition bmp_ssp.c:359
uint8_t flags
12: 8 flag bits
Definition bmp.h:319
void refresh_wdt(void)
Refresh the watchdog timer so that the watchdog doesn't bark.
Definition bmp_hw.c:508
bool fan_sense
Compute fan speed.
Definition bmp_hw.c:256
uint8_t srce_port
SDP source port/CPU.
Definition bmp.h:246
void event_schedule(event_t *e, uint32_t t)
Schedules an event to occur some time in the future.
Definition bmp_event.c:279
void io_printf(char *stream, char *f,...)
Print to an output stream.
Definition bmp_io.c:266
event_t * event_new(event_proc proc, uint32_t a1, uint32_t a2)
Allocates a new event.
Definition bmp_event.c:242
ip_data_t spin_ip
IP address of the board we manage.
Definition bmp_net.c:186
void configure_clocks(void)
Configure the clocks.
Definition bmp_clock.c:192
void configure_can(uint32_t id)
Initialises the CAN controller.
Definition bmp_can.c:881
uint8_t can_status[CAN_SIZE]
Whether a particular board is talking to the CAN bus.
Definition bmp_can.c:142
uint32_t cpu_int_off(void)
Disable interrupts.
Definition bmp_hw.c:279
void ssp0_write(uint32_t cmd, uint32_t addr, uint32_t len, const uint8_t *buf)
Write buffer to Serial Flash.
Definition bmp_ssp.c:167
void(* proc4)(uint32_t, uint32_t, uint32_t, uint32_t)
Type of a function that takes four arguments.
Definition bmp.h:376
event_proc proc
Proc to be called or NULL.
Definition bmp.h:557
static boot_vec_t *const boot_vec
Boot vector.
Definition bmp.h:468
void(* LPC_IAP)(uint32_t *cmd, uint32_t *res)
LPC17xx In-Application Programming entry point.
Definition bmp.h:494
uint32_t shutdown
Shutdown flags.
Definition bmp.h:352
static fl_dir_t *const fl_dir
Address in Flash of Flash directory.
Definition bmp.h:485
uint16_t flags
Flags (bmp_iptag_flags)
Definition bmp.h:205
void configure_eth(const uint8_t *mac_addr)
Configure the ethernet hardware.
Definition bmp_eth.c:197
uint32_t i2c_send(LPC_I2C_TypeDef *restrict i2c, uint32_t ctrl, uint32_t addr, uint32_t length, const void *buf)
Send a buffer over I2C.
Definition bmp_i2c.c:114
void clock_div(uint32_t bit_pos, uint32_t value)
Configure clock division.
Definition bmp_hw.c:300
uint32_t arg1
Arg 1.
Definition bmp.h:254
void eth_update_tx(void)
Select the next transmission buffer.
Definition bmp_eth.c:97
uint32_t eth_rx_rdy(void)
Is the ethernet hardware ready to receive?
Definition bmp_eth.c:82
void proc_led(uint32_t arg1, uint32_t arg2)
Control the LEDs on this board; call led_set()
Definition bmp_cmd.c:372
uint32_t arg2
Arg 2.
Definition bmp.h:255
uint32_t time
Time (CPU ticks) until event due (0 if at head of Q)
Definition bmp.h:560
struct sdp_msg * next
Next in free list.
Definition bmp.h:237
uint16_t cmd_rc
Command/Return Code.
Definition bmp.h:252
void fpga_word(uint32_t addr, uint32_t fpga, uint32_t *buf, uint32_t dir)
Read or write an FPGA.
Definition bmp_ssp.c:77
void can_proc_cmd(uint32_t dest, uint32_t op, uint32_t arg1, uint32_t arg2)
Asks another BMP to run a proc from proc_list.
Definition bmp_can.c:746
const uint32_t hw_ver
Hardware version.
Definition bmp_hw.c:270
uint16_t seq
Sequence number.
Definition bmp.h:253
void set_power(uint32_t state)
Turn board off or on.
Definition bmp_hw.c:316
void lcd_ctrl(uint32_t c)
Write a control byte to the LCD.
Definition bmp_i2c.c:299
void ssp1_copy(uint32_t count, const uint8_t *buf)
Copy buffer to FPGAs.
Definition bmp_ssp.c:58
uint32_t flash_erase(uint32_t start, uint32_t end)
Erase sectors given start and end (byte) addresses.
Definition bmp_flash.c:83
void(* main_proc)(void *, uint32_t, uint32_t, uint32_t)
Type of a main entry point.
Definition bmp.h:378
void delay_us(uint32_t n)
Delay using a busy loop.
Definition bmp_hw.c:968
uint8_t mac_byte
14: Byte 1 of MAC address
Definition bmp.h:321
handler boot_proc
Boot handler.
Definition bmp.h:458
static uint32_t *const dbg_vec
64 byte (16 word) uninitialised fault debug vector
Definition bmp.h:544
uint16_t srce_addr
SDP source address.
Definition bmp.h:248
sdp_msg_t * msg_get(void)
"Allocate" a message from the free message pool
Definition bmp_net.c:209
Board status.
Definition bmp.h:346
Boot vector.
Definition bmp.h:456
Cortex master vector.
Definition bmp.h:381
Data read from EEPROM.
Definition bmp.h:311
Record of how to handle an event.
Definition bmp.h:556
Flash directory entry.
Definition bmp.h:296
Information about an IP address.
Definition bmp.h:356
IPTag entry (24 bytes)
Definition bmp.h:200
SDP message type definition.
Definition bmp.h:236
static void die(uint32_t code)
Curl up and die.
Definition bmp_boot.c:75
static uint8_t fan
Current fan speed. 0 (off) .. 3 (high)
Definition bmp_main.c:179