Core Coupled Memory executable on STM32F4xx?












1














Trying to run code from a STM32F429s CCM but I always get a Hard Fault with the IBUSERR flag set as soon as I hit the first instruction in the CCM.



The instruction is valid and well aligned.
Is it possible that the STM32F4xx does not allow execution from the CCM? (Data access works well).



alios










share|improve this question
























  • On this part the CCM has a performance advantage only when used to access data concurrently with DMA access to other on-chip memory by avoiding bus contention.
    – Clifford
    Apr 11 at 17:24
















1














Trying to run code from a STM32F429s CCM but I always get a Hard Fault with the IBUSERR flag set as soon as I hit the first instruction in the CCM.



The instruction is valid and well aligned.
Is it possible that the STM32F4xx does not allow execution from the CCM? (Data access works well).



alios










share|improve this question
























  • On this part the CCM has a performance advantage only when used to access data concurrently with DMA access to other on-chip memory by avoiding bus contention.
    – Clifford
    Apr 11 at 17:24














1












1








1







Trying to run code from a STM32F429s CCM but I always get a Hard Fault with the IBUSERR flag set as soon as I hit the first instruction in the CCM.



The instruction is valid and well aligned.
Is it possible that the STM32F4xx does not allow execution from the CCM? (Data access works well).



alios










share|improve this question















Trying to run code from a STM32F429s CCM but I always get a Hard Fault with the IBUSERR flag set as soon as I hit the first instruction in the CCM.



The instruction is valid and well aligned.
Is it possible that the STM32F4xx does not allow execution from the CCM? (Data access works well).



alios







embedded stm32






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 11 at 22:15









jubobs

32.7k17100124




32.7k17100124










asked Apr 11 at 6:39









alios

163




163












  • On this part the CCM has a performance advantage only when used to access data concurrently with DMA access to other on-chip memory by avoiding bus contention.
    – Clifford
    Apr 11 at 17:24


















  • On this part the CCM has a performance advantage only when used to access data concurrently with DMA access to other on-chip memory by avoiding bus contention.
    – Clifford
    Apr 11 at 17:24
















On this part the CCM has a performance advantage only when used to access data concurrently with DMA access to other on-chip memory by avoiding bus contention.
– Clifford
Apr 11 at 17:24




On this part the CCM has a performance advantage only when used to access data concurrently with DMA access to other on-chip memory by avoiding bus contention.
– Clifford
Apr 11 at 17:24












1 Answer
1






active

oldest

votes


















4














The CCM in these parts is only connected to the data bus. Instructions cannot be fetched from this memory -- only flash memory, SRAM1, and external memory should be used for code.



System architecture for STM32F42xxx and STM32F43xxx devices



For more information, refer to section 2.1 ("System Architecture") of the reference manual, which is where the above image came from.






share|improve this answer





















  • Thnx! On the STM32F3 it was also possible to run code from there.
    – alios
    Apr 11 at 7:13










  • But you can run from the SRAM. Place the critical routines there and stack and data in thew CCM - this is most efficient way to handle the critical routines.
    – P__J__
    Apr 11 at 10:41










  • @Clifford Are you sure? The sections on the I-bus and S-bus explicitly mention fetching instructions; the section on the D-bus, by contrast, does not. It says that the target is "memory containing code or data", but that seems like it's in reference to the D-bus's use for literal data loads.
    – duskwuff
    Apr 11 at 15:37










  • @duskwuff : I stand corrected - the D-Bus allows data and debug access to code space, not execution. It is more clearly explained at infocenter.arm.com/help/index.jsp?topic=/…, though somewhat unhelpfully ST have used slightly different nomenclature.
    – Clifford
    Apr 11 at 17:09






  • 1




    @PeterJ_01 : I am not sure of your objection. That is what "I stand corrected" means - the change is clearly flagged. I deleted the original comments because a read might not get past that and be mislead.
    – Clifford
    Apr 11 at 19:27













Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49768163%2fcore-coupled-memory-executable-on-stm32f4xx%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









4














The CCM in these parts is only connected to the data bus. Instructions cannot be fetched from this memory -- only flash memory, SRAM1, and external memory should be used for code.



System architecture for STM32F42xxx and STM32F43xxx devices



For more information, refer to section 2.1 ("System Architecture") of the reference manual, which is where the above image came from.






share|improve this answer





















  • Thnx! On the STM32F3 it was also possible to run code from there.
    – alios
    Apr 11 at 7:13










  • But you can run from the SRAM. Place the critical routines there and stack and data in thew CCM - this is most efficient way to handle the critical routines.
    – P__J__
    Apr 11 at 10:41










  • @Clifford Are you sure? The sections on the I-bus and S-bus explicitly mention fetching instructions; the section on the D-bus, by contrast, does not. It says that the target is "memory containing code or data", but that seems like it's in reference to the D-bus's use for literal data loads.
    – duskwuff
    Apr 11 at 15:37










  • @duskwuff : I stand corrected - the D-Bus allows data and debug access to code space, not execution. It is more clearly explained at infocenter.arm.com/help/index.jsp?topic=/…, though somewhat unhelpfully ST have used slightly different nomenclature.
    – Clifford
    Apr 11 at 17:09






  • 1




    @PeterJ_01 : I am not sure of your objection. That is what "I stand corrected" means - the change is clearly flagged. I deleted the original comments because a read might not get past that and be mislead.
    – Clifford
    Apr 11 at 19:27


















4














The CCM in these parts is only connected to the data bus. Instructions cannot be fetched from this memory -- only flash memory, SRAM1, and external memory should be used for code.



System architecture for STM32F42xxx and STM32F43xxx devices



For more information, refer to section 2.1 ("System Architecture") of the reference manual, which is where the above image came from.






share|improve this answer





















  • Thnx! On the STM32F3 it was also possible to run code from there.
    – alios
    Apr 11 at 7:13










  • But you can run from the SRAM. Place the critical routines there and stack and data in thew CCM - this is most efficient way to handle the critical routines.
    – P__J__
    Apr 11 at 10:41










  • @Clifford Are you sure? The sections on the I-bus and S-bus explicitly mention fetching instructions; the section on the D-bus, by contrast, does not. It says that the target is "memory containing code or data", but that seems like it's in reference to the D-bus's use for literal data loads.
    – duskwuff
    Apr 11 at 15:37










  • @duskwuff : I stand corrected - the D-Bus allows data and debug access to code space, not execution. It is more clearly explained at infocenter.arm.com/help/index.jsp?topic=/…, though somewhat unhelpfully ST have used slightly different nomenclature.
    – Clifford
    Apr 11 at 17:09






  • 1




    @PeterJ_01 : I am not sure of your objection. That is what "I stand corrected" means - the change is clearly flagged. I deleted the original comments because a read might not get past that and be mislead.
    – Clifford
    Apr 11 at 19:27
















4












4








4






The CCM in these parts is only connected to the data bus. Instructions cannot be fetched from this memory -- only flash memory, SRAM1, and external memory should be used for code.



System architecture for STM32F42xxx and STM32F43xxx devices



For more information, refer to section 2.1 ("System Architecture") of the reference manual, which is where the above image came from.






share|improve this answer












The CCM in these parts is only connected to the data bus. Instructions cannot be fetched from this memory -- only flash memory, SRAM1, and external memory should be used for code.



System architecture for STM32F42xxx and STM32F43xxx devices



For more information, refer to section 2.1 ("System Architecture") of the reference manual, which is where the above image came from.







share|improve this answer












share|improve this answer



share|improve this answer










answered Apr 11 at 6:45









duskwuff

145k19176229




145k19176229












  • Thnx! On the STM32F3 it was also possible to run code from there.
    – alios
    Apr 11 at 7:13










  • But you can run from the SRAM. Place the critical routines there and stack and data in thew CCM - this is most efficient way to handle the critical routines.
    – P__J__
    Apr 11 at 10:41










  • @Clifford Are you sure? The sections on the I-bus and S-bus explicitly mention fetching instructions; the section on the D-bus, by contrast, does not. It says that the target is "memory containing code or data", but that seems like it's in reference to the D-bus's use for literal data loads.
    – duskwuff
    Apr 11 at 15:37










  • @duskwuff : I stand corrected - the D-Bus allows data and debug access to code space, not execution. It is more clearly explained at infocenter.arm.com/help/index.jsp?topic=/…, though somewhat unhelpfully ST have used slightly different nomenclature.
    – Clifford
    Apr 11 at 17:09






  • 1




    @PeterJ_01 : I am not sure of your objection. That is what "I stand corrected" means - the change is clearly flagged. I deleted the original comments because a read might not get past that and be mislead.
    – Clifford
    Apr 11 at 19:27




















  • Thnx! On the STM32F3 it was also possible to run code from there.
    – alios
    Apr 11 at 7:13










  • But you can run from the SRAM. Place the critical routines there and stack and data in thew CCM - this is most efficient way to handle the critical routines.
    – P__J__
    Apr 11 at 10:41










  • @Clifford Are you sure? The sections on the I-bus and S-bus explicitly mention fetching instructions; the section on the D-bus, by contrast, does not. It says that the target is "memory containing code or data", but that seems like it's in reference to the D-bus's use for literal data loads.
    – duskwuff
    Apr 11 at 15:37










  • @duskwuff : I stand corrected - the D-Bus allows data and debug access to code space, not execution. It is more clearly explained at infocenter.arm.com/help/index.jsp?topic=/…, though somewhat unhelpfully ST have used slightly different nomenclature.
    – Clifford
    Apr 11 at 17:09






  • 1




    @PeterJ_01 : I am not sure of your objection. That is what "I stand corrected" means - the change is clearly flagged. I deleted the original comments because a read might not get past that and be mislead.
    – Clifford
    Apr 11 at 19:27


















Thnx! On the STM32F3 it was also possible to run code from there.
– alios
Apr 11 at 7:13




Thnx! On the STM32F3 it was also possible to run code from there.
– alios
Apr 11 at 7:13












But you can run from the SRAM. Place the critical routines there and stack and data in thew CCM - this is most efficient way to handle the critical routines.
– P__J__
Apr 11 at 10:41




But you can run from the SRAM. Place the critical routines there and stack and data in thew CCM - this is most efficient way to handle the critical routines.
– P__J__
Apr 11 at 10:41












@Clifford Are you sure? The sections on the I-bus and S-bus explicitly mention fetching instructions; the section on the D-bus, by contrast, does not. It says that the target is "memory containing code or data", but that seems like it's in reference to the D-bus's use for literal data loads.
– duskwuff
Apr 11 at 15:37




@Clifford Are you sure? The sections on the I-bus and S-bus explicitly mention fetching instructions; the section on the D-bus, by contrast, does not. It says that the target is "memory containing code or data", but that seems like it's in reference to the D-bus's use for literal data loads.
– duskwuff
Apr 11 at 15:37












@duskwuff : I stand corrected - the D-Bus allows data and debug access to code space, not execution. It is more clearly explained at infocenter.arm.com/help/index.jsp?topic=/…, though somewhat unhelpfully ST have used slightly different nomenclature.
– Clifford
Apr 11 at 17:09




@duskwuff : I stand corrected - the D-Bus allows data and debug access to code space, not execution. It is more clearly explained at infocenter.arm.com/help/index.jsp?topic=/…, though somewhat unhelpfully ST have used slightly different nomenclature.
– Clifford
Apr 11 at 17:09




1




1




@PeterJ_01 : I am not sure of your objection. That is what "I stand corrected" means - the change is clearly flagged. I deleted the original comments because a read might not get past that and be mislead.
– Clifford
Apr 11 at 19:27






@PeterJ_01 : I am not sure of your objection. That is what "I stand corrected" means - the change is clearly flagged. I deleted the original comments because a read might not get past that and be mislead.
– Clifford
Apr 11 at 19:27




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49768163%2fcore-coupled-memory-executable-on-stm32f4xx%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Full-time equivalent

Bicuculline

さくらももこ