pid.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. // Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. // http://www.apache.org/licenses/LICENSE-2.0
  7. //
  8. // Unless required by applicable law or agreed to in writing, software
  9. // distributed under the License is distributed on an "AS IS" BASIS,
  10. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. // See the License for the specific language governing permissions and
  12. // limitations under the License.
  13. #ifndef _SOC_PID_H_
  14. #define _SOC_PID_H_
  15. #define PROPID_GEN_BASE 0x3FF1F000
  16. //Bits 1..7: 1 if interrupt will be triggering PID change
  17. #define PROPID_CONFIG_INTERRUPT_ENABLE ((PROPID_GEN_BASE)+0x000)
  18. //Vectors for the various interrupt handlers
  19. #define PROPID_CONFIG_INTERRUPT_ADDR_1 ((PROPID_GEN_BASE)+0x004)
  20. #define PROPID_CONFIG_INTERRUPT_ADDR_2 ((PROPID_GEN_BASE)+0x008)
  21. #define PROPID_CONFIG_INTERRUPT_ADDR_3 ((PROPID_GEN_BASE)+0x00C)
  22. #define PROPID_CONFIG_INTERRUPT_ADDR_4 ((PROPID_GEN_BASE)+0x010)
  23. #define PROPID_CONFIG_INTERRUPT_ADDR_5 ((PROPID_GEN_BASE)+0x014)
  24. #define PROPID_CONFIG_INTERRUPT_ADDR_6 ((PROPID_GEN_BASE)+0x018)
  25. #define PROPID_CONFIG_INTERRUPT_ADDR_7 ((PROPID_GEN_BASE)+0x01C)
  26. //Delay, in CPU cycles, before switching to new PID
  27. #define PROPID_CONFIG_PID_DELAY ((PROPID_GEN_BASE)+0x020)
  28. #define PROPID_CONFIG_NMI_DELAY ((PROPID_GEN_BASE)+0x024)
  29. //Last detected interrupt. Set by hw on int.
  30. #define PROPID_TABLE_LEVEL ((PROPID_GEN_BASE)+0x028)
  31. //PID/prev int data for each int
  32. #define PROPID_FROM_1 ((PROPID_GEN_BASE)+0x02C)
  33. #define PROPID_FROM_2 ((PROPID_GEN_BASE)+0x030)
  34. #define PROPID_FROM_3 ((PROPID_GEN_BASE)+0x034)
  35. #define PROPID_FROM_4 ((PROPID_GEN_BASE)+0x038)
  36. #define PROPID_FROM_5 ((PROPID_GEN_BASE)+0x03C)
  37. #define PROPID_FROM_6 ((PROPID_GEN_BASE)+0x040)
  38. #define PROPID_FROM_7 ((PROPID_GEN_BASE)+0x044)
  39. #define PROPID_FROM_PID_MASK 0x7
  40. #define PROPID_FROM_PID_S 0
  41. #define PROPID_FROM_INT_MASK 0xF
  42. #define PROPID_FROM_INT_S 3
  43. //PID to be set after confirm routine
  44. #define PROPID_PID_NEW ((PROPID_GEN_BASE)+0x048)
  45. //Write to kick off PID change
  46. #define PROPID_PID_CONFIRM ((PROPID_GEN_BASE)+0x04c)
  47. //current PID?
  48. #define PROPID_PID_REG ((PROPID_GEN_BASE)+0x050)
  49. //Write to mask NMI
  50. #define PROPID_PID_NMI_MASK_HW_ENABLE ((PROPID_GEN_BASE)+0x054)
  51. //Write to unmask NMI
  52. #define PROPID_PID_NMI_MASK_HW_DISABLE ((PROPID_GEN_BASE)+0x058)
  53. #define PROPID_PID_NMI_MASK_HW_REG ((PROPID_GEN_BASE)+0x05c)
  54. //Debug regs
  55. #define PROPID_PID ((PROPID_GEN_BASE)+0x060)
  56. #define PROPID_NMI_MASK_HW ((PROPID_GEN_BASE)+0x064)
  57. #endif /* _SOC_PID_H_ */