ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Четверг
25 апреля
895663
klen (13.01.2019 08:22, просмотров: 386)
stm32f767zi, после настройки региона и включения MPU перестают работать прерывания. код в потоке продолжает работать, флаги прерывания в переферии взводятся вот мой код mpu.state_disable(); mpu.region_number = 0 ; mpu.region_base_addr.write((uint32_t)&adc_frame) ; mpu.attribute_and_size.modify( mpu_t::attribute_and_size_t::region_state_t::enable, mpu_t::attribute_and_size_t::region_size_t::size32, (mpu_t::attribute_and_size_t::subregion_state_t::enum_t)0, mpu_t::attribute_and_size_t::access_attributes_t::strongly_ordered_shareable, mpu_t::attribute_and_size_t::access_permission_t::any_rw, mpu_t::attribute_and_size_t::instruction_access_t::enable ); mpu.state_enable( mpu_t::control_t::operation_during_hf_nmi_fltmask_handler_t::disable, mpu_t::control_t::privileged_software_access_default_t::enable ); выход компиллера void adc_dma_buffer_mpu_config() { 8000560: b410 push {r4} // настройка атрибутоов доступа к буферу nop_rep(4); 8000562: bf00 nop 8000564: bf00 nop 8000566: bf00 nop 8000568: bf00 nop mpu.state_disable(); __inline_static__ void dmb() { asm volatile ("dmb 0xf":::"memory"); } 800056a: f3bf 8f5f dmb sy 800056e: 491b ldr r1, [pc, #108] ; (80005dc <adc_dma_buffer_mpu_config()+0x7c>) 8000570: 6a4b ldr r3, [r1, #36] ; 0x24 8000572: f023 0001 bic.w r0, r3, #1 8000576: 6248 str r0, [r1, #36] ; 0x24 8000578: 4b19 ldr r3, [pc, #100] ; (80005e0 <adc_dma_buffer_mpu_config()+0x80>) 800057a: 2200 movs r2, #0 800057c: 605a str r2, [r3, #4] nop_rep(4); 800057e: bf00 nop 8000580: bf00 nop 8000582: bf00 nop 8000584: bf00 nop mpu.region_number = 0 ; 8000586: 609a str r2, [r3, #8] nop_rep(4); 8000588: bf00 nop 800058a: bf00 nop 800058c: bf00 nop 800058e: bf00 nop mpu.region_base_addr.write((uint32_t)&adc_frame) ; 8000590: 4c14 ldr r4, [pc, #80] ; (80005e4 <adc_dma_buffer_mpu_config()+0x84>) 8000592: 60dc str r4, [r3, #12] nop_rep(4); 8000594: bf00 nop 8000596: bf00 nop 8000598: bf00 nop 800059a: bf00 nop mpu.attribute_and_size.modify( mpu_t::attribute_and_size_t::region_state_t::enable, mpu_t::attribute_and_size_t::region_size_t::size32, (mpu_t::attribute_and_size_t::subregion_state_t::enum_t)0, mpu_t::attribute_and_size_t::access_attributes_t::strongly_ordered_shareable, mpu_t::attribute_and_size_t::access_permission_t::any_rw, mpu_t::attribute_and_size_t::instruction_access_t::enable ); 800059c: 6918 ldr r0, [r3, #16] 800059e: 4c12 ldr r4, [pc, #72] ; (80005e8 <adc_dma_buffer_mpu_config()+0x88>) 80005a0: 4a12 ldr r2, [pc, #72] ; (80005ec <adc_dma_buffer_mpu_config()+0x8c>) 80005a2: 4020 ands r0, r4 80005a4: 4302 orrs r2, r0 80005a6: 611a str r2, [r3, #16] nop_rep(4); 80005a8: bf00 nop 80005aa: bf00 nop 80005ac: bf00 nop 80005ae: bf00 nop mpu.state_enable( mpu_t::control_t::operation_during_hf_nmi_fltmask_handler_t::disable, mpu_t::control_t::privileged_software_access_default_t::enable ); 80005b0: 6858 ldr r0, [r3, #4] 80005b2: f020 0407 bic.w r4, r0, #7 80005b6: f044 0205 orr.w r2, r4, #5 80005ba: 605a str r2, [r3, #4] 80005bc: 6a4b ldr r3, [r1, #36] ; 0x24 80005be: f043 0001 orr.w r0, r3, #1 80005c2: 6248 str r0, [r1, #36] ; 0x24 __inline_static__ void dsb() { asm volatile ("dsb 0xf":::"memory"); } 80005c4: f3bf 8f4f dsb sy __inline_static__ void isb() { asm volatile ("isb 0xf":::"memory"); } 80005c8: f3bf 8f6f isb sy nop_rep(4); 80005cc: bf00 nop 80005ce: bf00 nop 80005d0: bf00 nop 80005d2: bf00 nop } 80005d4: f85d 4b04 ldr.w r4, [sp], #4 80005d8: 4770 bx lr 80005da: bf00 nop 80005dc: e000ed00 .word 0xe000ed00 80005e0: e000ed90 .word 0xe000ed90 80005e4: 20020060 .word 0x20020060 80005e8: e8c000c0 .word 0xe8c000c0 80005ec: 03000009 .word 0x03000009